From ce8e14ede195c1bee8bcc28f6496634b8ddee323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9meth=20Noel?= Date: Wed, 7 Jul 2021 18:36:24 +0200 Subject: [PATCH] Use proper method for refreshing position --- src/main/java/net/minestom/server/entity/Entity.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/minestom/server/entity/Entity.java b/src/main/java/net/minestom/server/entity/Entity.java index 377837463..40d6e4d7e 100644 --- a/src/main/java/net/minestom/server/entity/Entity.java +++ b/src/main/java/net/minestom/server/entity/Entity.java @@ -531,7 +531,7 @@ public class Entity implements Viewable, Tickable, EventHandler, Da // Apply the position if changed if (!finalVelocityPosition.samePoint(position)) { - refreshCoordinate(finalVelocityPosition); + refreshPosition((Pos) finalVelocityPosition, true); sendPositionUpdate(true); } @@ -1318,7 +1318,6 @@ public class Entity implements Viewable, Tickable, EventHandler, Da * @param newPosition the new position */ private void refreshCoordinate(Point newPosition) { - position = position.withCoord(newPosition); if (hasPassenger()) { for (Entity passenger : getPassengers()) { passenger.refreshCoordinate(newPosition);