Compare commits

...
Author SHA1 Message Date
Axionize 646c32112e Fix 1.20.2 < || > 1.21.4 Reach False with Rot only packets 2025-07-24 08:43:44 -04:00
2 changed files with 6 additions and 2 deletions

No files matched your search

@@ -32,7 +32,7 @@ public class ReachInterpolationData {
private final SimpleCollisionBox targetLocation;
private final GrimPlayer player;
private final PacketEntity entity;
private SimpleCollisionBox startingLocation;
public SimpleCollisionBox startingLocation;
private int interpolationStepsLowBound = 0;
private int interpolationStepsHighBound = 0;
private int interpolationSteps = 1;
@@ -147,7 +147,11 @@ public class PacketEntity extends TypedPacketEntity {
}
}
this.oldPacketLocation = newPacketLocation;
this.newPacketLocation = new ReachInterpolationData(player, oldPacketLocation.getPossibleLocationCombined(), trackedServerPosition, this);
if (!hasPos && (player.getClientVersion().isNewerThan(ClientVersion.V_1_21_4) || player.getClientVersion().isOlderThan(ClientVersion.V_1_20_2))) {
this.newPacketLocation = new ReachInterpolationData(player, oldPacketLocation.startingLocation, trackedServerPosition, this);
} else {
this.newPacketLocation = new ReachInterpolationData(player, oldPacketLocation.getPossibleLocationCombined(), trackedServerPosition, this);
}
// In versions < 1.16.2 when the client receives non-relative teleport for an entity
// And they move less by the thresholds given, the entity does not move client side