mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-16 21:21:22 +01:00
Gravity tick counter should be part of the velocity tick method
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
3977b6f967
commit
b5062ab4d6
@ -438,7 +438,6 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler
|
||||
// Entity tick
|
||||
{
|
||||
// Cache the number of "gravity tick"
|
||||
this.gravityTickCount = onGround ? 0 : gravityTickCount + 1;
|
||||
velocityTick();
|
||||
|
||||
// handle block contacts
|
||||
@ -465,6 +464,8 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler
|
||||
}
|
||||
|
||||
private void velocityTick() {
|
||||
this.gravityTickCount = onGround ? 0 : gravityTickCount + 1;
|
||||
|
||||
final boolean isSocketClient = PlayerUtils.isSocketClient(this);
|
||||
if (isSocketClient) {
|
||||
if (position.samePoint(previousPosition))
|
||||
|
Loading…
Reference in New Issue
Block a user