Class TextDisplayEntity

All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity

public class TextDisplayEntity extends DisplayBaseEntity
  • Constructor Details

  • Method Details

    • initializeMetadata

      protected void initializeMetadata()
      Description copied from class: Entity
      Called on entity spawn. Used to populate the entity metadata and flags with default values.
      Overrides:
      initializeMetadata in class Entity
    • setInvisible

      protected void setInvisible(boolean value)
      Description copied from class: Entity
      Set a boolean - whether the entity is invisible or visible
      Overrides:
      setInvisible in class Entity
      Parameters:
      value - true if the entity is invisible
    • setCustomNameVisible

      public void setCustomNameVisible(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)
      Overrides:
      setCustomNameVisible in class Entity
    • setCustomName

      public void setCustomName(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<Optional<net.kyori.adventure.text.Component>,?> entityMetadata)
      Overrides:
      setCustomName in class Entity
    • setNametagAlwaysShow

      public void setNametagAlwaysShow(boolean value)
      Overrides:
      setNametagAlwaysShow in class Entity
    • setNameEntityData

      protected void setNameEntityData(String nametag)
      Overrides:
      setNameEntityData in class Entity
    • despawnEntity

      public void despawnEntity()
      Description copied from class: Entity
      Despawns the entity
      Overrides:
      despawnEntity in class Entity
    • moveRelativeRaw

      public void moveRelativeRaw(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)
      Overrides:
      moveRelativeRaw in class Entity
    • moveAbsoluteRaw

      public void moveAbsoluteRaw(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)
      Overrides:
      moveAbsoluteRaw in class Entity
    • setText

      public void setText(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<net.kyori.adventure.text.Component,?> entityMetadata)
    • updateBedrockMetadata

      public void updateBedrockMetadata()
      Description copied from class: Entity
      Sends the Bedrock metadata to the client
      Overrides:
      updateBedrockMetadata in class Entity
    • updateNameTag

      public void updateNameTag()
    • calculateLineOffset

      public float calculateLineOffset()
      Calculates the Y offset needed to match Java Edition's text centering behavior for multi-line text displays. In Java Edition, multi-line text displays are centered vertically.
      Returns:
      the Y offset to apply based on the number of lines
    • getSecondEntity

      @Nullable public @Nullable ArmorStandEntity getSecondEntity()
      On Java Edition, armor stands can have a custom name shown additionally to the text in the display. They are rendered separately, and can cross each other...
    • isInvisible

      public boolean isInvisible()
    • getLineCount

      public int getLineCount()