Use PositionSync instead of Teleport packet

This commit is contained in:
Moulberry committed 2025-01-13 13:43:38 -05:00
1 parent 48cbcaa776
commit b0ab20a3ea
2 files changed
+5 -9

No files matched your search

@@ -1085,8 +1085,8 @@ public class ReplayServer extends IntegratedServer {
byte quantizedXRot = (byte) Mth.floor(serverEntity.entity.getXRot() * 256.0F / 360.0F);
if (!serverEntity.positionCodec.getBase().equals(trackingPosition)) {
trackedEntity.broadcast(new ClientboundTeleportEntityPacket(serverEntity.entity.getId(),
PositionMoveRotation.of(serverEntity.entity), Set.of(), serverEntity.wasOnGround));
trackedEntity.broadcast(new ClientboundEntityPositionSyncPacket(serverEntity.entity.getId(),
PositionMoveRotation.of(serverEntity.entity), serverEntity.wasOnGround));
serverEntity.positionCodec.setBase(trackingPosition);
serverEntity.lastSentYRot = quantizedYRot;
serverEntity.lastSentXRot = quantizedXRot;