Class Renderers.ItemDisplayRenderer
java.lang.Object
com.github.darksoulq.abyssallib.world.particle.impl.Renderers.ItemDisplayRenderer
- All Implemented Interfaces:
ParticleRenderer
- Enclosing class:
Renderers
A high-performance renderer that uses
ItemDisplay entities.
Instead of spawning particles every tick, this renderer manages a pool of entities and updates their transformations. This allows for complex 3D models to be part of an effect with minimal network overhead.
-
Constructor Summary
ConstructorsConstructorDescriptionItemDisplayRenderer(org.bukkit.inventory.ItemStack item, float scale, org.bukkit.entity.Display.Billboard billboard) Constructs a new ItemDisplayRenderer. -
Method Summary
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ParticleRenderer
start
-
Constructor Details
-
ItemDisplayRenderer
public ItemDisplayRenderer(org.bukkit.inventory.ItemStack item, float scale, org.bukkit.entity.Display.Billboard billboard) Constructs a new ItemDisplayRenderer.- Parameters:
item- TheItemStackto display.scale- The uniform scale of the items.billboard- TheDisplay.Billboardmode.
-
-
Method Details
-
render
public void render(org.bukkit.Location center, List<org.bukkit.util.Vector> points, List<org.bukkit.entity.Player> players) Manages the entity pool and updates transformations.Automatically spawns new entities if the point count increases and cleans up excess entities if it decreases.
- Specified by:
renderin interfaceParticleRenderer- Parameters:
center- The origin location.points- The target coordinates for the displays.players- The players who are allowed to see these entities.
-
stop
public void stop()Removes all entities in the pool and clears the list.- Specified by:
stopin interfaceParticleRenderer
-