mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-27 11:38:03 +01:00
Merge branch 'master' into nbt-permission
This commit is contained in:
commit
1b7f00f1b9
@ -105,7 +105,6 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer, P
|
||||
private long scheduledRemoveTime;
|
||||
|
||||
private final Set<Entity> passengers = new CopyOnWriteArraySet<>();
|
||||
private long lastUpdate;
|
||||
protected EntityType entityType; // UNSAFE to change, modify at your own risk
|
||||
|
||||
// Network synchronization, send the absolute position of the entity each X milliseconds
|
||||
@ -461,8 +460,7 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer, P
|
||||
}
|
||||
|
||||
// Entity tick
|
||||
if (shouldUpdate(time)) {
|
||||
this.lastUpdate = time;
|
||||
{
|
||||
|
||||
// Velocity
|
||||
boolean applyVelocity = false;
|
||||
@ -1417,10 +1415,6 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer, P
|
||||
this.lastAbsoluteSynchronizationTime = 0;
|
||||
}
|
||||
|
||||
private boolean shouldUpdate(long time) {
|
||||
return (float) (time - lastUpdate) >= MinecraftServer.TICK_MS * 0.9f; // Margin of error
|
||||
}
|
||||
|
||||
private enum Pose {
|
||||
STANDING,
|
||||
FALL_FLYING,
|
||||
|
Loading…
Reference in New Issue
Block a user