Class TeleportCache
java.lang.Object
org.geysermc.geyser.session.cache.TeleportCache
Represents a teleport ID and corresponding coordinates that need to be confirmed.
The vanilla Java client, after getting a
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.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionTeleportCache(GeyserSession session, org.cloudburstmc.math.vector.Vector3f position, float pitch, float yaw, int teleportConfirmId) TeleportCache(GeyserSession session, org.cloudburstmc.math.vector.Vector3f position, org.cloudburstmc.math.vector.Vector3f velocity, float pitch, float yaw, int teleportConfirmId, TeleportCache.TeleportType teleportType) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConfirm(org.cloudburstmc.math.vector.Vector3f position) protected booleanbooleanorg.cloudburstmc.math.vector.Vector3ffloatgetPitch()org.cloudburstmc.math.vector.Vector3fintintorg.cloudburstmc.math.vector.Vector3ffloatgetYaw()inthashCode()voidvoidvoidsetUnconfirmedFor(int unconfirmedFor) booleantoString()
-
Constructor Details
-
TeleportCache
public TeleportCache(GeyserSession session, org.cloudburstmc.math.vector.Vector3f position, float pitch, float yaw, int teleportConfirmId) -
TeleportCache
public TeleportCache(GeyserSession session, org.cloudburstmc.math.vector.Vector3f position, org.cloudburstmc.math.vector.Vector3f velocity, float pitch, float yaw, int teleportConfirmId, TeleportCache.TeleportType teleportType)
-
-
Method Details
-
canConfirm
public boolean canConfirm(org.cloudburstmc.math.vector.Vector3f position) -
incrementUnconfirmedFor
public void incrementUnconfirmedFor() -
resetUnconfirmedFor
public void resetUnconfirmedFor() -
shouldResend
public boolean shouldResend() -
getPosition
public org.cloudburstmc.math.vector.Vector3f getPosition() -
getAdjustedPosition
public org.cloudburstmc.math.vector.Vector3f getAdjustedPosition() -
getVelocity
public org.cloudburstmc.math.vector.Vector3f getVelocity() -
getPitch
public float getPitch() -
getYaw
public float getYaw() -
getTeleportConfirmId
public int getTeleportConfirmId() -
getTeleportType
-
getUnconfirmedFor
public int getUnconfirmedFor() -
setUnconfirmedFor
public void setUnconfirmedFor(int unconfirmedFor) -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-