diff --git a/src/main/java/net/minestom/server/entity/ai/goal/RandomLookAroundGoal.java b/src/main/java/net/minestom/server/entity/ai/goal/RandomLookAroundGoal.java index d0f80ce60..a16e5299e 100644 --- a/src/main/java/net/minestom/server/entity/ai/goal/RandomLookAroundGoal.java +++ b/src/main/java/net/minestom/server/entity/ai/goal/RandomLookAroundGoal.java @@ -68,7 +68,7 @@ public class RandomLookAroundGoal extends GoalSelector { @Override public void tick(long time) { --lookTime; - entityCreature.teleport(entityCreature.getPosition().withDirection(lookDirection)); + entityCreature.refreshPosition(entityCreature.getPosition().withDirection(lookDirection)); } @Override diff --git a/src/main/java/net/minestom/server/entity/pathfinding/Navigator.java b/src/main/java/net/minestom/server/entity/pathfinding/Navigator.java index fd7b49911..77a0fb2d0 100644 --- a/src/main/java/net/minestom/server/entity/pathfinding/Navigator.java +++ b/src/main/java/net/minestom/server/entity/pathfinding/Navigator.java @@ -78,7 +78,7 @@ public class Navigator { final var physicsResult = CollisionUtils.handlePhysics(entity, new Vec(speedX, speedY, speedZ)); // Will move the entity during Entity#tick - entity.teleport(physicsResult.newPosition()); + entity.refreshPosition(physicsResult.newPosition()); } public void jump(float height) {