Remove some teleport call

This commit is contained in:
TheMode 2021-07-07 19:34:46 +02:00
parent c9b2356a0b
commit faae59ff44
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ public class RandomLookAroundGoal extends GoalSelector {
@Override @Override
public void tick(long time) { public void tick(long time) {
--lookTime; --lookTime;
entityCreature.teleport(entityCreature.getPosition().withDirection(lookDirection)); entityCreature.refreshPosition(entityCreature.getPosition().withDirection(lookDirection));
} }
@Override @Override

View File

@ -78,7 +78,7 @@ public class Navigator {
final var physicsResult = CollisionUtils.handlePhysics(entity, new Vec(speedX, speedY, speedZ)); final var physicsResult = CollisionUtils.handlePhysics(entity, new Vec(speedX, speedY, speedZ));
// Will move the entity during Entity#tick // Will move the entity during Entity#tick
entity.teleport(physicsResult.newPosition()); entity.refreshPosition(physicsResult.newPosition());
} }
public void jump(float height) { public void jump(float height) {