ParticleComponent

public class ParticleComponent

Plays a model's Blockbench particle keyframes. Emitters and their live particles belong to the model, so remove (chunk unload, death, deleteall, reload) clears them without any per-emitter checks. Ticks on the asynchronous model clock; viewer changes arrive from the primary thread, hence the synchronization.

Constructors

Link copied to clipboard
public void ParticleComponent(ModeledEntity modeledEntity)

Functions

Link copied to clipboard
public synchronized int activeEmitterCount()
Link copied to clipboard
public synchronized void hideFrom(UUID viewer)
Link copied to clipboard
public synchronized void onAnimationFrame(Animation animation, int frame)
Starts the keyframes on this frame.
Link copied to clipboard
public synchronized void onAnimationStopped(Animation animation)
Looping emitters stop spawning with their animation; live particles finish their lifetime.
Link copied to clipboard
public synchronized void remove()
Link copied to clipboard
Replaces how particle sprites are created, for tests.
Link copied to clipboard
public synchronized void tick(AbstractPacketBundle bundle, Collection<UUID> javaViewers)
Advances every emitter and draws it for the given Java viewers.