Fix recording of 4-8 block teleports on 1.8.9 and below (fixes #525)

This commit is contained in:
Jonas Herzig
2021-08-21 14:35:21 +02:00
parent 5f9297b78e
commit 33328adc9f

View File

@@ -166,8 +166,14 @@ public class RecordingEventHandler extends EventRegistrations {
lastY = player.getY();
lastZ = player.getZ();
//#if MC>=10904
final double maxRelDist = 8.0;
//#else
//$$ final double maxRelDist = 4.0;
//#endif
Packet packet;
if (force || Math.abs(dx) > 8.0 || Math.abs(dy) > 8.0 || Math.abs(dz) > 8.0) {
if (force || Math.abs(dx) > maxRelDist || Math.abs(dy) > maxRelDist || Math.abs(dz) > maxRelDist) {
//#if MC>=10800
packet = new EntityPositionS2CPacket(player);
//#else