Class TeleportHistory

java.lang.Object
com.hypixel.hytale.builtin.teleport.components.TeleportHistory
All Implemented Interfaces:
Component<EntityStore>, Cloneable

public class TeleportHistory extends Object implements Component<EntityStore>
An entity component that tracks the teleport history for a player.
  • Constructor Details

    • TeleportHistory

      public TeleportHistory()
      Default Constructor for a TeleportHistory instance.
  • Method Details

    • getComponentType

      @Nonnull public static ComponentType<EntityStore, TeleportHistory> getComponentType()
      Returns:
      the component type for the TeleportHistory component.
    • forward

      public void forward(@Nonnull Ref<EntityStore> ref, int count)
      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

      public void back(@Nonnull Ref<EntityStore> ref, int count)
      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

      @Nonnull public String toString()
      Overrides:
      toString in class Object
    • clone

      @Nonnull public Component<EntityStore> clone()
      Specified by:
      clone in interface Component<EntityStore>
      Returns:
      a clone instance of the original component instance.