Package net.citizensnpcs.trait
Class HologramTrait.TextDisplayRenderer
java.lang.Object
net.citizensnpcs.trait.HologramTrait.SingleEntityHologramRenderer
net.citizensnpcs.trait.HologramTrait.TextDisplayRenderer
- All Implemented Interfaces:
HologramTrait.HologramRenderer
- Direct Known Subclasses:
HologramTrait.TextDisplayVehicleRenderer
- Enclosing class:
HologramTrait
public static class HologramTrait.TextDisplayRenderer
extends HologramTrait.SingleEntityHologramRenderer
-
Field Summary
Fields inherited from class net.citizensnpcs.trait.HologramTrait.SingleEntityHologramRenderer
hologram, text
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected NPC
void
Hologram spawning is delegated toHologramTrait.SingleEntityHologramRenderer.createNPC(Entity, String, Vector3d)
void
setBackgroundColor
(Color color) void
updateText
(NPC npc, String raw) Update the hologram text.Methods inherited from class net.citizensnpcs.trait.HologramTrait.SingleEntityHologramRenderer
destroy, getEntities, 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, setTextShadow
-
Constructor Details
-
TextDisplayRenderer
public TextDisplayRenderer()
-
-
Method Details
-
createNPC
- Specified by:
createNPC
in classHologramTrait.SingleEntityHologramRenderer
-
render0
Description copied from class:HologramTrait.SingleEntityHologramRenderer
Hologram spawning is delegated toHologramTrait.SingleEntityHologramRenderer.createNPC(Entity, String, Vector3d)
- Specified by:
render0
in classHologramTrait.SingleEntityHologramRenderer
-
setBackgroundColor
-
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 NPCraw
- the new hologram text
-