mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-02 14:38:26 +01:00
Remove some teleport call
This commit is contained in:
parent
c9b2356a0b
commit
faae59ff44
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user