Particle format
This feature is exclusive to Java Edition.
When particles are spawned using the /particle
command, by biomes or enchantments, they can be configured using NBT or JSON data.
Usage
When referenced from a biome or enchantment definition, a particle is defined using:
- [NBT Compound / JSON Object]: The particle object
- [String] type: The id of the particle type, see Particles (Java Edition) for valid options
- Additional fields based on the type, see below
List of particle types
Some particle types have configurations that need to be specified. These types and the configuration fields are:
- block, block_marker, dust_pillar, and falling_dust
- [NBT Compound / JSON Object] block_state: Contains the block state used for the particle.
- Block state see Template:Nbt inherit/block state/template
- Alternative syntax:
- [String] block_state: The resource location of the block to use.
- [NBT Compound / JSON Object] block_state: Contains the block state used for the particle.
- dust
- [NBT List / JSON Array] color: Three floats representing the red, green, and blue components of the dust color, each from 0 to 1.
- [Float] scale: Controls the size of the dust particles.
- dust_color_transition
- [NBT List / JSON Array] from_color: Three floats representing the red, green, and blue components of the start color, each from 0 to 1.
- [NBT List / JSON Array] to_color: Three floats representing the red, green, and blue components of the end color, each from 0 to 1.
- [Float] scale: Controls the size of the particles.
- entity_effect
- [NBT List / JSON Array] color: Four floats representing the red, green, blue, and alpha components of the color, each from 0 to 1.
- Alternative syntax:
- [Int] color: Decimal number representing the ARGB color, calculated using this formula:
Alpha<<24 + Red<<16 + Green<<8 + Blue
- item
- [NBT Compound / JSON Object] item: Contains the item data used for the particle.
- A single item stack see Template:Nbt inherit/itemnocount/template
- Alternative syntax:
- [String] item: The resource location of the item to use.
- [NBT Compound / JSON Object] item: Contains the item data used for the particle.
- sculk_charge
- [Float] roll: The angle the particle displays at in radians.
- shriek
- [Int] delay: The delay in ticks.
- vibration
- [NBT Compound / JSON Object] destination: The destination. Can only use the
block
type.- A position source see Template:Nbt inherit/position source/template
- [Int] arrival_in_ticks: The duration of the move.
- [NBT Compound / JSON Object] destination: The destination. Can only use the
All other types don't have any configuration.
History
[hide]Java Edition | |||||||
---|---|---|---|---|---|---|---|
1.20.5 | 24w14a | Added particle types dust_pillar , infested , item_cobweb , ominous_spawning , raid_omen , small_gust , trial_omen , and trial_spawner_detection_ominous . | |||||
1.20.5-pre1 | Particle options in SNBT format are now used in the /particle command.
| ||||||
Changes to item particle: renamed value field to item , now also allows a string item ID as shorthand.
| |||||||
Changes to block particle: renamed value field to block_state , now also allows a string block ID as shorthand.
| |||||||
Changes to entity_effect particle: renamed value field to color , now also allows a list of 4 floats.
| |||||||
Changes to dust_color_transition particle: renamed fromColor to from_color and toColor to to_color . |
See also
[hide] | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
|