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.-
Constructor Summary
ConstructorDescriptionTeleportCache(double x, double y, double z, float pitch, float yaw, int teleportConfirmId)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canConfirm(com.nukkitx.math.vector.Vector3d position)
protected boolean
boolean
float
getPitch()
int
int
double
getX()
double
getY()
float
getYaw()
double
getZ()
int
hashCode()
void
void
setUnconfirmedFor(int unconfirmedFor)
boolean
toString()
-
Constructor Details
-
TeleportCache
public TeleportCache(double x, double y, double z, float pitch, float yaw, int teleportConfirmId)
-
-
Method Details
-
canConfirm
public boolean canConfirm(com.nukkitx.math.vector.Vector3d position) -
incrementUnconfirmedFor
public void incrementUnconfirmedFor() -
shouldResend
public boolean shouldResend() -
getX
public double getX() -
getY
public double getY() -
getZ
public double getZ() -
getPitch
public float getPitch() -
getYaw
public float getYaw() -
getTeleportConfirmId
public int getTeleportConfirmId() -
getUnconfirmedFor
public int getUnconfirmedFor() -
setUnconfirmedFor
public void setUnconfirmedFor(int unconfirmedFor) -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-