Skip to content
JasperLorelai edited this page Oct 23, 2023 · 30 revisions

Source Code

Description:

Plays a particle effect.

Configuration:

Option Description Variable Type Default Value
particle-name The name of the particle that is displayed. List of particle names. String ""
count The number of particles that are displayed in the effect. Integer 5
radius Since Beta 13. Particles are only shown to players in that radius. Integer 50
speed The speed of the particle Double 0.2
horiz-spread Defines how much the particle is spread horizontally. Double 0.2
vert-spread Defines how much the particle is spread vertically. Double 0.2
x-spread X axis spread. Takes priority over horiz-spread. Double horiz-spread
y-spread Y axis spread. Takes priority over vert-spread. Double vert-spread
z-spread Z axis spread. Takes priority over horiz-spread. Double horiz-spread
force Whether to send the particle to players within an extended range and encourage their client to render it regardless of settings. Boolean False

Dumb formats:

For some reason certain particles use dumb formats to achieve their custom data configurations. List below:

spell_mob & spell_mob_ambient:

Coloring these particles requires:

  • count: 0 - It'll then only spawn one particle. If you need to spawn more, you'll have to make the effect play multiple times, probably by using a Dummy Buff spell, and having the effect on buff position, controlling the duration of the particles with the buff's duration, and the interval with the buff position's effect-interval: <ticks>.
  • speed: 1
  • x/y/z-offset will be used to control the color as (red, green, blue) colors respectively. Values must be up to 1.0. This means that the value should color/255.

Example below. Note that since Beta 13, you don't have to calculate the color as the equation will be understood and calculated by MS. You can find a color picker here - set the red, green, and blue values to the RGB color values.

particle-name: spell_mob
count: 0
speed: 1
x-spread: red / 255
y-spread: green / 255
z-spread: blue / 255

note:

Coloring these particles requires:

  • count: 0 - It'll then only spawn one particle. See above for a way to spawn more.
  • speed: 1
  • x-offset will be used to control the color. Must be up to 1.0. There are 24 notes and their colors, so the color value should be note/24.
  • y-offset: 0
  • z-offset: 0

Notes

Example below. Note that since Beta 13, you don't have to calculate the color as the equation will be understood and calculated by MS.

particle-name: note
count: 0
speed: 1
x-spread: note / 24
y-spread: 0
z-spread: 0

Particle-specific options:

redstone:

Option Type Default Value
color Color ff0000 (red)
size Integer 1

item_crack:

Option Type
material Material

block_crack, falling_dust, and block_marker:

Option Type
material Block Data

dust_color_transition:

Option Type Default Value
color Color ff0000 (red)
to-color Color 000000 (black)
size Integer 1

vibration:

Option Type Default Value
vibration-origin Can be: caster, target, or position (effect's position). position
vibration-relative-offset Vector
vibration-offset Vector
static-destination Boolean false
vibration-destination Can be: caster, target, or position (effect's position). position
arrival-time Integer -1

sculk_charge:

Option Type Default Value
sculk-charge-rotation Float 0

shriek:

Option Type Default Value
shriek-delay Integer 0

Example:

lavabuff:
    spell-class: ".buff.DummySpell"
    duration: 10
    effect-interval: 5
    effects:
          lava:
               position: caster
               effect: particles
               particle-name: lava
               horiz-spread: 0.3
               vert-spread: 0.3
               speed: 0.2
               count: 8

Clone this wiki locally