mirror of
https://github.com/funkemunky/KauriV3.git
synced 2026-05-31 05:51:55 +00:00
Fixing cause of crash
This commit is contained in:
@@ -139,6 +139,13 @@ public class PacketHandler {
|
||||
player.getMovement().setExcuseNextFlying(true);
|
||||
}
|
||||
|
||||
if(player.getMovement().getPosLocs().stream()
|
||||
.noneMatch(tpLoc -> tpLoc.toVector3d().distanceSquared(packet.getLocation().getPosition()) < 2)
|
||||
&& player.getMovement().getFrom().getLoc().toVector3d().distanceSquared(packet.getLocation().getPosition()) > 2500) {
|
||||
Anticheat.INSTANCE.alog("Player moved more than 50 blocks illegally! Cancelled...");
|
||||
return true;
|
||||
}
|
||||
|
||||
player.getMovement().process(packet);
|
||||
|
||||
var result = player.getCheckHandler().callSyncPacket(wrapped, timestamp);
|
||||
|
||||
Reference in New Issue
Block a user