Particle Display
This page explains how to configure a Particle Display using a YAML configuration file in your plugin. You can customize particle type, color, movement, size, rotation, and more.
π§ Basic Example
particle:
type: FLAME
count: 10
extra: 0.1
force: true
offset: 0.2, 0.5, 0.2
direction: 0, 1, 0
size: 1
color: 255, 100, 50
βοΈ Configuration Options
type
type
Defines the type of particle to use. All available types can be found here. Example:
type: FLAME
count
count
How many particles appear each time it's shown. Example:
count: 20
extra
extra
Controls how fast or wide the particles spread. The meaning depends on the particle type. Example:
extra: 0.01
force
force
If true
, the particles are always shown to players even at a long distance.
Example:
force: true
offset
offset
Controls how much the particles move randomly when they appear. You can use one number (applied to all directions):
offset: 0.3
Or use three numbers (for X, Y, Z separately):
offset: 0.2, 0.5, 0.2
direction
direction
Sets a fixed direction in which particles move. Example (upward):
direction: 0, 1, 0
size
size
Controls the size of particles (for certain particles like colored ones). Example:
size: 1.2
π¨ Color Options
You can use this to add color to your particles (like REDSTONE or DUST).
color
color
You can provide:
1 color β Normal colored particle
2 colors β Transition between two colors
3 values β RGB values (Red, Green, Blue)
6 values β Two RGB colors for a smooth transition
Examples:
Single Color
color: 255, 0, 0 # Red
Color Transition
color: 255, 0, 0, 0, 0, 255 # Red to Blue
βοΈ Material Types (Block or Item)
blockdata
blockdata
Use a block name to show particles related to that block (e.g., BLOCK_CRACK).
blockdata: STONE
itemstack
itemstack
Use an item name to show particles with item visuals (e.g., ITEM_CRACK).
itemstack: DIAMOND_SWORD
materialdata
materialdata
Old-style block format (not commonly needed).
materialdata: GRASS_BLOCK
π Rotations (Advanced)
You can rotate your particle group using rotation groups. Each group can have one or more rotations.
Example:
rotations:
group-1:
0:
angle: 3.14
vector: "Y"
1:
angle: 2
vector: "1, 0, 0"
group-2:
0:
angle: 1.6
vector: "0, 1, 0"
angle
β How much to rotate in radians (Ο β 3.14).vector
β The axis to rotate around. You can use:Letters:
X
,Y
, orZ
Custom vector:
"1, 0, 0"
means rotate around the X-axis
π§ͺ Tips
For colored particles like REDSTONE, set the
color
andsize
.If using DUST_TRANSITION, use 6 color values for smooth color blending.
Make sure the
type
supports the extra data you define (e.g., color or block).
π§Ύ Full Example
particle:
type: REDSTONE
count: 15
extra: 0.01
force: false
offset: 0.2, 0.2, 0.2
direction: 0, 1, 0
size: 1.0
color: 255, 0, 0, 0, 0, 255
rotations:
spin:
0:
angle: 1.57
vector: Y
Last updated