mirror of
https://github.com/Minestom/Minestom.git
synced 2024-06-22 20:44:54 +02:00
Move sync time reset (#504)
This commit is contained in:
parent
b7ad2fef5c
commit
723bee2ea5
|
@ -1178,6 +1178,7 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler
|
|||
final Chunk chunk = getChunk();
|
||||
if (distanceX > 8 || distanceY > 8 || distanceZ > 8) {
|
||||
PacketUtils.prepareViewablePacket(chunk, new EntityTeleportPacket(getEntityId(), position, isOnGround()), this);
|
||||
this.lastAbsoluteSynchronizationTime = System.currentTimeMillis();
|
||||
} else if (positionChange && viewChange) {
|
||||
PacketUtils.prepareViewablePacket(chunk, EntityPositionAndRotationPacket.getPacket(getEntityId(), position,
|
||||
lastSyncedPosition, isOnGround()), this);
|
||||
|
@ -1189,7 +1190,6 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler
|
|||
PacketUtils.prepareViewablePacket(chunk, new EntityHeadLookPacket(getEntityId(), position.yaw()), this);
|
||||
PacketUtils.prepareViewablePacket(chunk, new EntityRotationPacket(getEntityId(), position.yaw(), position.pitch(), onGround), this);
|
||||
}
|
||||
this.lastAbsoluteSynchronizationTime = System.currentTimeMillis();
|
||||
this.lastSyncedPosition = position;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user