Index
Component Concept
The particle system is component based. What this means is that particle effects are composed via a set of components. In order for an effect to do something, you add a component that handles that aspect of the effect. For example, an emitter usually needs to have rules for its lifetime, thus the effect should have one or more lifetime components that handle lifetime duties for the emitter and emitted particles.The idea is that new components can be added later, and one can combine components (where it makes sense) to get different behaviors. A particle might have a Dynamic component for moving around, and a Collision component for handling interaction with the terrain, for example.Think of components as telling the particle system what you want the emitter or particle to do, rather than exposing a list of particle parameters and wrangling of those parameters to get the desired behavior.Back to topNamespacing
All particle effects should be namespaced (in their name).Namespacing involves adding a 'name:' prefix on the effect tag.Regular Minecraft will use the 'minecraft: prefix. See the examples for example names.Back to topMoLang integration
Where it makes sense, any field can use a MoLang expression. MoLang expressions are strings, and are defined in the MoLang documentation. The particle system uses some special MoLang variables that particle MoLang expressions can use. Additionally, custom MoLang paramaters can be set in various ways and used in MoLang expressions in effects.Name | Description |
---|---|
variable.emitterage | Age since the current loop started for the emitter |
variable.emitterlifetime | How long the current loop lasts for the emitter |
variable.emitterrandom1 | A random from 0.0 to 1.0 that is constant for the current loop of the emitter |
variable.emitterrandom2 | Another random from 0.0 to 1.0 that is constant for the current loop of the emitter |
variable.emitterrandom3 | A third random from 0.0 to 1.0 that is constant for the current loop of the emitter |
variable.emitterrandom4 | A fourth random from 0.0 to 1.0 that is constant for the current loop of the emitter |
variable.particleage | How long the particle has lived |
variable.particlelifetime | How long the particle lives for |
variable.particlerandom1 | A random from 0.0 to 1.0 that is constant for the lifetime of the particle |
variable.particlerandom2 | Another random from 0.0 to 1.0 that is constant for the lifetime of the particle |
variable.particlerandom3 | A third random from 0.0 to 1.0 that is constant for the lifetime of the particle |
variable.particlerandom4 | A fourth random from 0.0 to 1.0 that is constant for the lifetime of the particle |
Basic Structure Overview
Particle effects consist of basic render parameters, and a set of components. Components can be placed in any order. Outline:In Detail
Outline:Current Component List
For fields in these components, the following shorthand is used:Emitter Components
Emitter Lifetime Components
Emitter Lifetime Expression component
Emitter will turn 'on' when the activation expression is non-zero, and will turn 'off' when it's zero. This is useful for situations like driving an entity-attached emitter from an actor variable.Emitter Lifetime Looping component
Emitter will loop until it is removed.Emitter Lifetime Once component
Emitter will execute once, and once the lifetime ends or the number of particles allowed to emit have emitted, the emitter expires.Emitter Rate Components
Emitter Rate Instant component
All particles come out at once, then no more unless the emitter loops.Emitter Rate Manual component
Particle emission will occur only when the emitter is told to emit via the game itself. This is mostly used by legacy particle effects.Emitter Rate Steady component
Particles come out at a steady or MoLang rate over time.Emitter Shape Components
Shape controls both where the particles are emitted from and the initial direction of the particles.Emitter Shape Custom component
All particles are emitted based on a specified set of MoLang expressions.