Items gravity is predicted client-side

This commit is contained in:
TheMode 2021-08-13 08:01:48 +02:00
parent 5a1eb83f49
commit d785f50447
1 changed files with 8 additions and 1 deletions

View File

@ -536,7 +536,14 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler
// Entity shouldn't be updated when moving in an unloaded chunk
return;
}
refreshPosition(finalVelocityPosition, true);
if (this instanceof ItemEntity) {
// TODO find other exceptions
this.position = finalVelocityPosition;
refreshCoordinate(finalVelocityPosition);
} else {
refreshPosition(finalVelocityPosition, true);
}
// Update velocity
if (hasVelocity || !newVelocity.isZero()) {