FollowingText

public final class FollowingText implements TrackedPacketEntity, AutoCloseable

Tracks text at a moving anchor without making it a passenger. Minecraft hides ordinary living-entity names when they carry passengers, including packet-only ones. Owns the supplied text until closed; use the existing tracker for viewer lifecycle.

Constructors

Link copied to clipboard
public void FollowingText(FakeText text, Entity anchor, Supplier<Location> position, Predicate<Player> viewerFilter)

Functions

Link copied to clipboard
public boolean canBeSeenBy(Player player)
Checks whether a player is allowed to see this entity, independent of range and world.
Link copied to clipboard
public void close()
Link copied to clipboard
public Set<UUID> getCurrentViewers()
Gets all players who can currently see this entity.
Link copied to clipboard
public Location getTrackingLocation()
Gets the location used for tracking distance.
Link copied to clipboard
public UUID getUniqueId()
Gets the unique identifier for this entity.
Link copied to clipboard
public Entity getVehicle()
Gets the vehicle entity this is attached to, if any.
Link copied to clipboard
public World getWorld()
Gets the world this entity is in.
Link copied to clipboard
public void hideFromPlayer(Player player)
Hides this entity from a player.
Link copied to clipboard
public boolean isValid()
Checks if this entity is still valid and should be tracked.
Link copied to clipboard
public boolean isVisibleTo(Player player)
Checks if this entity is currently visible to a player.
Link copied to clipboard
public void remount()
Called when the entity needs to remount to its vehicle.
Link copied to clipboard
public void showToPlayer(Player player)
Shows this entity to a player.
Link copied to clipboard
public void updateTracking()
Updates a moving anchor before visibility is evaluated.