Package net.citizensnpcs.trait
Class HologramTrait.ItemRenderer
java.lang.Object
net.citizensnpcs.trait.HologramTrait.SingleEntityHologramRenderer
net.citizensnpcs.trait.HologramTrait.ItemRenderer
- All Implemented Interfaces:
HologramTrait.HologramRenderer
- Enclosing class:
HologramTrait
-
Field Summary
Fields inherited from class net.citizensnpcs.trait.HologramTrait.SingleEntityHologramRenderer
hologram, text
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected NPC
void
destroy()
Destroy/teardown any rendered holograms.protected void
Hologram spawning is delegated toHologramTrait.SingleEntityHologramRenderer.createNPC(Entity, String, Vector3d)
void
updateText
(NPC npc, String text) Update the hologram text.Methods inherited from class net.citizensnpcs.trait.HologramTrait.SingleEntityHologramRenderer
getPerPlayerText, registry, render, setRegistry, setViewRange, spawnHologram
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.citizensnpcs.trait.HologramTrait.HologramRenderer
isSneaking, onSeenByPlayer, setBackgroundColor
-
Constructor Details
-
ItemRenderer
public ItemRenderer()
-
-
Method Details
-
createNPC
- Specified by:
createNPC
in classHologramTrait.SingleEntityHologramRenderer
-
destroy
public void destroy()Description copied from interface:HologramTrait.HologramRenderer
Destroy/teardown any rendered holograms.- Specified by:
destroy
in interfaceHologramTrait.HologramRenderer
- Overrides:
destroy
in classHologramTrait.SingleEntityHologramRenderer
-
getEntities
- Specified by:
getEntities
in interfaceHologramTrait.HologramRenderer
- Overrides:
getEntities
in classHologramTrait.SingleEntityHologramRenderer
- Returns:
- Any associated hologram entities. Used in
HologramTrait.HologramRenderer.getEntities()
.
-
render0
Description copied from class:HologramTrait.SingleEntityHologramRenderer
Hologram spawning is delegated toHologramTrait.SingleEntityHologramRenderer.createNPC(Entity, String, Vector3d)
- Specified by:
render0
in classHologramTrait.SingleEntityHologramRenderer
-
updateText
Description copied from interface:HologramTrait.HologramRenderer
Update the hologram text. Will be called first beforeHologramTrait.HologramRenderer.render(NPC, Vector3d)
.- Specified by:
updateText
in interfaceHologramTrait.HologramRenderer
- Overrides:
updateText
in classHologramTrait.SingleEntityHologramRenderer
- Parameters:
npc
- the parent NPCtext
- the new hologram text
-