mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-20 07:02:32 +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
|
@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
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user