Gravity tick counter should be part of the velocity tick method

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2021-09-11 05:54:26 +02:00
parent 3977b6f967
commit b5062ab4d6
1 changed files with 2 additions and 1 deletions

View File

@ -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))