SpawnParticles - DragonSurvivalTeam/DragonSurvival GitHub Wiki
Description
An effect modification is a persistent modifier that increases the duration or amplifier of a list of target effects. It also uses a Modification subtype to determine how to modify the duration or amplifier.
PositionSource
A position source is the data needed to position a particle effect.
Schema
{
"type": [PositionSourceType] // [Mandatory] || The type of the position source. Either "entity_position" (directly in the center of the entity) or "in_bounding_box" (spread out across the bounding box of the entity randomly)
"offset": [number] // [Mandatory] || How much to offset the position by (on all axes)
"scale": [number] // [Optional] || How much to scale the positioning of the particle when using "in_bounding_box"
}
VelocitySource
A velocity source is the data needed to determine the velocity of a particle.
Schema
{
"movement_scale": [number] // [Mandatory] || How much to factor in the movement of the target
"base": [number] // [Mandatory] || The base speed of the particle (sampled in a random range)
}
Schema
{
"particle": [ParticleType] // [Mandatory] || The type of particle to spawn
"horizontal_position": [PositionSource] // [Mandatory] || The horizontal position of the particle relative to the target
"vertical_position": [PositionSource] // [Mandatory] || The vertical position of the particle relative to the target
"horizontal_velocity": [VelocitySource] // [Mandatory] || The horizontal velocity of the particle
"vertical_velocity": [VelocitySource] // [Mandatory] || The vertical velocity of the particle
"speed": [number] // [Mandatory] || The speed of the particle
}
Example
This is an example of spawning particles around the player for the soul revelation ability.
{
"effect_type": "dragonsurvival:particle",
"particle_count": 20.0,
"particle_data": {
"horizontal_position": {
"type": "in_bounding_box"
},
"horizontal_velocity": {
"base": 0.05
},
"particle": {
"type": "minecraft:soul"
},
"speed": 0.05,
"vertical_position": {
"type": "in_bounding_box"
},
"vertical_velocity": {
"base": 0.05
}
}