mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-17 05:31:23 +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
|
// Entity tick
|
||||||
{
|
{
|
||||||
// Cache the number of "gravity tick"
|
// Cache the number of "gravity tick"
|
||||||
this.gravityTickCount = onGround ? 0 : gravityTickCount + 1;
|
|
||||||
velocityTick();
|
velocityTick();
|
||||||
|
|
||||||
// handle block contacts
|
// handle block contacts
|
||||||
@ -465,6 +464,8 @@ public class Entity implements Viewable, Tickable, TagHandler, PermissionHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void velocityTick() {
|
private void velocityTick() {
|
||||||
|
this.gravityTickCount = onGround ? 0 : gravityTickCount + 1;
|
||||||
|
|
||||||
final boolean isSocketClient = PlayerUtils.isSocketClient(this);
|
final boolean isSocketClient = PlayerUtils.isSocketClient(this);
|
||||||
if (isSocketClient) {
|
if (isSocketClient) {
|
||||||
if (position.samePoint(previousPosition))
|
if (position.samePoint(previousPosition))
|
||||||
|
Loading…
Reference in New Issue
Block a user