mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-29 11:49:16 +00:00
Remove extra height added to position when server corrects movement
This should fix the bug where you can "climb" up blocks. Although this doesn't fix the random spasm the client gets, it should prevent players from climbing up blocks (and getting stuck in them), thus preventing anticheats from going crazy.
This commit is contained in:
@@ -92,7 +92,7 @@ public class JavaPlayerPositionRotationTranslator extends PacketTranslator<Serve
|
||||
float zDis = Math.abs(entity.getPosition().getZ() - (float) packet.getZ());
|
||||
|
||||
if (xDis > 1.5 || (yDis < 1.45 || yDis > (session.isJumping() ? 4.3 : (session.isSprinting() ? 2.5 : 1.9))) || zDis > 1.5) {
|
||||
entity.moveAbsolute(session, Vector3f.from(packet.getX(), packet.getY() + 0.6f, packet.getZ()), packet.getYaw(), packet.getPitch(), true);
|
||||
entity.moveAbsolute(session, Vector3f.from(packet.getX(), packet.getY(), packet.getZ()), packet.getYaw(), packet.getPitch(), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user