Contents
Class TeleportHistory
java.lang.Object
com.hypixel.hytale.builtin.teleport.components.TeleportHistory
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
An entity component that tracks the teleport history for a player.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA waypoint representing a teleportation point in history. -
Field Summary
Fields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(World world, org.joml.Vector3d pos, Rotation3f rotation, String key) Append a new waypoint to the teleport history.voidback(Ref<EntityStore> ref, int count) Move backward in the teleport history by the specified count.clone()voidforward(Ref<EntityStore> ref, int count) Move forward in the teleport history by the specified count.intstatic ComponentType<EntityStore, TeleportHistory> inttoString()Methods inherited from interface Component
cloneSerializable
-
Constructor Details
-
TeleportHistory
public TeleportHistory()Default Constructor for aTeleportHistoryinstance.
-
-
Method Details
-
getComponentType
- Returns:
- the component type for the
TeleportHistorycomponent.
-
forward
Move forward in the teleport history by the specified count.- Parameters:
ref- The entity reference of the associated player entity.count- The number of steps to move forward in the history.
-
back
Move backward in the teleport history by the specified count.- Parameters:
ref- The entity reference of the associated ref entity.count- The number of steps to move backward in the history.
-
getForwardSize
public int getForwardSize()- Returns:
- the size of the forward teleport history.
-
getBackSize
public int getBackSize()- Returns:
- the size of the backward teleport history.
-
append
public void append(@Nonnull World world, @Nonnull org.joml.Vector3d pos, @Nonnull Rotation3f rotation, @Nonnull String key) Append a new waypoint to the teleport history.- Parameters:
world- The world of the waypoint.pos- The position of the waypoint.rotation- The rotation at the waypoint.key- A descriptive key or message for the waypoint.
-
toString
-
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-