ParticleSpriteRenderer

public final class ParticleSpriteRenderer

Draws one emitter's particles for Java players as packet-only item displays. The display's billboard orientation is applied before its transformation, so movement goes through the entity position (viewers glide over UPDATE_INTERVAL_TICKS) while spin and size use the transformation. Updates are sent at most every interval and only when something changed.

Constructors

Link copied to clipboard
public void ParticleSpriteRenderer(ParticleSprites sprites, ParticleEffectBlueprint effect, ParticleSpriteRenderer.SpriteFactory factory, int maxPerViewer)

Types

Link copied to clipboard
@FunctionalInterface()
public interface SpriteFactory
Creates a packet item display at a location; production uses the NMS adapter.

Properties

Link copied to clipboard
public final static int UPDATE_INTERVAL_TICKS

Functions

Link copied to clipboard
public void hideFrom(UUID viewer)
Hides every particle from a viewer that stopped seeing the owner.
Link copied to clipboard
public boolean isEmpty()
Link copied to clipboard
public void removeAll()
Removes every particle from every viewer.
Link copied to clipboard
public void render(ParticleEmitter emitter, Vector3d emitterPosition, Quaterniond emitterRotation, World world, Collection<UUID> viewers, AbstractPacketBundle bundle, int tick)
Link copied to clipboard
public static void resetViewerCounts()
Forgets every viewer's live-particle count, for tests and plugin shutdown.