Particles
Index
Functions
addBreakingItemParticle
- since: 2.4.0b119
Spawns EParticleType.ITEM_BREAK particles at a given location with a given item in world.
More about capabilitiesCalled only on the client side! Use packets to spawn particles for multiple players.
Parameters
id: number
numeric item ID
data: number
item data
x: number
y: number
z: number
Returns void
addFarParticle
Same as Particles.addParticle, but applies
farshader to the particle.Parameters
type: number
x: number
y: number
z: number
vx: number
vy: number
vz: number
optionaldata: number
Returns void
addParticle
Spawns particle of given type on given coords with given velocity and additional parameters in the world.
More about capabilitiesCalled only on the client side! Use packets to spawn particles for multiple players.
Parameters
type: number
particle type's numeric ID; if you want to spawn vanilla particles, see EParticleType enums
x: number
y: number
z: number
vx: number
velocity for the particle by X-axis
vy: number
velocity for the particle by Y-axis
vz: number
velocity for the particle by Z-axis
optionaldata: number
additional params, currently don't know how to use, just put 0
Returns void
getParticleTypeById
Parameters
id: number
Returns ParticleType
Object Particles.ParticleType of the particle by given ID, if it exists.
line
Spawnds particles in line with specified gapness.
Parameters
type: number
particle type's numeric ID; if you want to spawn vanilla particles, see EParticleType enums
coords1: Vector
start location of line
coords2: Vector
end location of line
optionalgap: number
gapness means step of particles, values more than 1 will increase offsets between particles; randomized
optionalvel: Vector
velocity of spawned particles
optionaldata: number
variant of spawned particles or properties
Returns void
registerParticleType
Registers new custom particle type of given params object.
Parameters
descriptor: ParticleDescription
Returns number
Created particle type's numeric ID.
Module to work with vanilla and custom particles.