Class TextDisplayEntity

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

public class TextDisplayEntity extends DisplayBaseEntity
  • Constructor Details

  • Method Details

    • 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. This value differs from the 0.1414f multiplier used in EntityUtils for text displays mounted on players, as this handles the base positioning rather than mount offset calculations.

      Returns:
      the Y offset to apply based on the number of lines
    • 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
    • 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
    • setText

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

      public int getLineCount()