Class TeleportSystems

java.lang.Object
com.hypixel.hytale.server.core.modules.entity.teleport.TeleportSystems

public class TeleportSystems extends Object
A class that holds systems for all teleport-related functionality
  • Constructor Details

    • TeleportSystems

      public TeleportSystems()
  • Method Details

    • queueAndSendClientTeleport

      public static void queueAndSendClientTeleport(@Nonnull PlayerRef playerRefComponent, @Nonnull org.joml.Vector3d position, @Nonnull Rotation3f rotation, @Nonnull Rotation3f lookOrientation, boolean resetVelocity)
      Queues an expected teleport ack for the player and sends the matching ClientTeleport. If an outbound packet filter swallows the packet, the queued entry is rolled back since the client will never acknowledge it.
      Parameters:
      playerRefComponent - The PlayerRef of the player being teleported.
      position - The position the client must acknowledge.
      rotation - The body rotation to send.
      lookOrientation - The look orientation to send.
      resetVelocity - Whether the client should reset its velocity.
    • completeTeleport

      public static void completeTeleport(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store, @Nonnull Player playerComponent, @Nullable org.joml.Vector3d ackedPosition)
      Completes a player's teleport sequence once every queued teleport has been acked: removes the PendingTeleport marker, resets the collision start position, and moves the player to the acked position. No-op when the marker is absent.
      Parameters:
      ref - The entity reference of the player.
      store - The Store the player lives in.
      playerComponent - The Player component of the player.
      ackedPosition - The position the client acked, or null to complete at the current transform position.