3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-10-03 08:21:06 +02: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.
Dieser Commit ist enthalten in:
RednedEpic 2020-02-24 20:04:18 -06:00
Ursprung b41d66dd19
Commit 1af4d71bd1

Datei anzeigen

@ -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);
}
}