mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 23:47:59 +01:00
Items gravity is predicted client-side
This commit is contained in:
parent
5a1eb83f49
commit
d785f50447
@ -536,7 +536,14 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler
|
|||||||
// Entity shouldn't be updated when moving in an unloaded chunk
|
// Entity shouldn't be updated when moving in an unloaded chunk
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
refreshPosition(finalVelocityPosition, true);
|
|
||||||
|
if (this instanceof ItemEntity) {
|
||||||
|
// TODO find other exceptions
|
||||||
|
this.position = finalVelocityPosition;
|
||||||
|
refreshCoordinate(finalVelocityPosition);
|
||||||
|
} else {
|
||||||
|
refreshPosition(finalVelocityPosition, true);
|
||||||
|
}
|
||||||
|
|
||||||
// Update velocity
|
// Update velocity
|
||||||
if (hasVelocity || !newVelocity.isZero()) {
|
if (hasVelocity || !newVelocity.isZero()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user