cleanup setClientPosition

This commit is contained in:
Sen 2025-06-16 11:14:56 +02:00
parent 431d54f779
commit 256721aa12
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
9 changed files with 246 additions and 282 deletions

View file

@ -553,11 +553,11 @@ public class ClientPlayer implements IClientPlayer
if (Math.abs(entity.posX - d0) < 0.03125D && Math.abs(entity.posY - d1) < 0.015625D && Math.abs(entity.posZ - d2) < 0.03125D)
{
entity.setPositionAndRotation2(entity.posX, entity.posY, entity.posZ, f, f1, 3, true);
entity.setClientPosition(entity.posX, entity.posY, entity.posZ, f, f1, true);
}
else
{
entity.setPositionAndRotation2(d0, d1, d2, f, f1, 3, true);
entity.setClientPosition(d0, d1, d2, f, f1, true);
}
entity.onGround = packetIn.getOnGround();
@ -597,7 +597,7 @@ public class ClientPlayer implements IClientPlayer
double d2 = (double)entity.serverPosZ / 32.0D;
float f = packetIn.hasRotations() ? (float)(packetIn.getYaw() * 360) / 256.0F : entity.rotYaw;
float f1 = packetIn.hasRotations() ? (float)(packetIn.getPitch() * 360) / 256.0F : entity.rotPitch;
entity.setPositionAndRotation2(d0, d1, d2, f, f1, 3, false);
entity.setClientPosition(d0, d1, d2, f, f1, false);
entity.onGround = packetIn.getOnGround();
}
}