forked from GeyserMC/Geyser
Snap height only if on ground
(Original commit 2dc6ab453f931ac2083a6d142e963beb0a101b94)
This commit is contained in:
parent
a0152db80c
commit
4c87a13e25
1 changed files with 2 additions and 1 deletions
|
@ -62,7 +62,8 @@ public class BedrockMovePlayerTranslator extends PacketTranslator<MovePlayerPack
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
double javaY = Math.ceil((packet.getPosition().getY() - EntityType.PLAYER.getOffset()) * 2) / 2;
|
double javaY = packet.getPosition().getY() - EntityType.PLAYER.getOffset();
|
||||||
|
if (packet.isOnGround()) javaY = Math.ceil(javaY * 2) / 2;
|
||||||
ClientPlayerPositionRotationPacket playerPositionRotationPacket = new ClientPlayerPositionRotationPacket(
|
ClientPlayerPositionRotationPacket playerPositionRotationPacket = new ClientPlayerPositionRotationPacket(
|
||||||
packet.isOnGround(), GenericMath.round(packet.getPosition().getX(), 4), javaY, GenericMath.round(packet.getPosition().getZ(), 4), packet.getRotation().getY(), packet.getRotation().getX()
|
packet.isOnGround(), GenericMath.round(packet.getPosition().getX(), 4), javaY, GenericMath.round(packet.getPosition().getZ(), 4), packet.getRotation().getY(), packet.getRotation().getX()
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue