Class TeleportCache

java.lang.Object
org.geysermc.geyser.session.cache.TeleportCache

public class TeleportCache extends Object
Represents a teleport ID and corresponding coordinates that need to be confirmed.
The vanilla Java client, after getting a ClientboundPlayerPositionPacket, adjusts the player's positions and immediately sends a teleport back. However, we want to acknowledge that the Bedrock player actually moves close to that point, so we store the teleport until we get a movement packet from Bedrock that the teleport was successful.
  • Constructor Details

    • TeleportCache

      public TeleportCache()
  • Method Details

    • canConfirm

      public boolean canConfirm(com.nukkitx.math.vector.Vector3d position)
    • incrementUnconfirmedFor

      public void incrementUnconfirmedFor()
    • resetUnconfirmedFor

      public void resetUnconfirmedFor()
    • shouldResend

      public boolean shouldResend()