Package org.geysermc.geyser.entity.type
Class TextDisplayEntity
java.lang.Object
org.geysermc.geyser.entity.type.Entity
org.geysermc.geyser.entity.type.DisplayBaseEntity
org.geysermc.geyser.entity.type.TextDisplayEntity
- All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity
-
Field Summary
Fields inherited from class org.geysermc.geyser.entity.type.Entity
definition, dirtyMetadata, displayName, entityId, flags, geyserId, headYaw, motion, nametag, onGround, passengers, pitch, position, propertyManager, session, silent, uuid, valid, vehicle, yaw -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatCalculates the Y offset needed to match Java Edition's text centering behavior for multi-line text displays.intprotected voidCalled on entity spawn.voidmoveAbsoluteRaw(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) voidsetText(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<net.kyori.adventure.text.Component, ?> entityMetadata) Methods inherited from class org.geysermc.geyser.entity.type.DisplayBaseEntity
getTranslation, setDisplayName, setDisplayNameVisible, setTranslationMethods inherited from class org.geysermc.geyser.entity.type.Entity
addAdditionalSpawnData, despawnEntity, doesJumpDismount, getBedrockRotation, getBoundingBoxHeight, getBoundingBoxWidth, getDefinition, getDirtyMetadata, getDisplayName, getEntityId, getFlag, getHeadYaw, getMaxAir, getMotion, getNametag, getPassengers, getPitch, getPosition, getPropertyManager, getSession, getVehicle, getYaw, geyserId, hasLeashesToDrop, interact, interactAt, isAlive, isOnGround, isShaking, isSilent, isValid, javaId, moveAbsolute, moveAbsolute, moveRelative, moveRelativeRaw, playEntityEvent, playEntityEvent, scoreVisibility, setAir, setAirSupply, setBoundingBoxHeight, setBoundingBoxWidth, setClientSideSilent, setDefinition, setDimensionsFromPose, setEntityId, setFlag, setFlags, setFlagsDirty, setFreezing, setGliding, setGravity, setHeadYaw, setInvisible, setMotion, setNametag, setOnGround, setPassengers, setPitch, setPose, setPosition, setRiderSeatPosition, setSilent, setSneaking, setSprinting, setValid, setVehicle, setYaw, spawnEntity, standardDisplayName, teamIdentifier, teleport, testInteraction, updateBedrockEntityProperties, updateBedrockMetadata, updateHeadLookRotation, updateInteractiveTag, updateMountOffset, updateNametag, updateNametag, updatePassengerOffsets, updatePositionAndRotation, updatePropertiesBatched, updateRotation, uuid, uuidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.geysermc.geyser.api.entity.type.GeyserEntity
updatePropertiesBatched, updateProperty
-
Constructor Details
-
TextDisplayEntity
-
-
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
EntityUtilsfor 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:
moveAbsoluteRawin classEntity
-
initializeMetadata
protected void initializeMetadata()Description copied from class:EntityCalled on entity spawn. Used to populate the entity metadata and flags with default values.- Overrides:
initializeMetadatain classEntity
-
setText
public void setText(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<net.kyori.adventure.text.Component, ?> entityMetadata) -
getLineCount
public int getLineCount()
-