Contents
Class TeleportSystems
java.lang.Object
com.hypixel.hytale.server.core.modules.entity.teleport.TeleportSystems
A class that holds systems for all teleport-related functionality
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe ref change system that handles moving entities during queued teleportationstatic classA ref change system that handles moving player entities during queued teleportation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcompleteTeleport(Ref<EntityStore> ref, Store<EntityStore> store, Player playerComponent, org.joml.Vector3d ackedPosition) Completes a player's teleport sequence once every queued teleport has been acked: removes thePendingTeleportmarker, resets the collision start position, and moves the player to the acked position.static voidqueueAndSendClientTeleport(PlayerRef playerRefComponent, org.joml.Vector3d position, Rotation3f rotation, Rotation3f lookOrientation, boolean resetVelocity) Queues an expected teleport ack for the player and sends the matchingClientTeleport.
-
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 matchingClientTeleport. If an outbound packet filter swallows the packet, the queued entry is rolled back since the client will never acknowledge it.- Parameters:
playerRefComponent- ThePlayerRefof 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 thePendingTeleportmarker, resets the collision start position, and moves the player to the acked position. No-op when the marker is absent.
-