mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-05 18:32:28 +01:00
Fix EntityCreature not resetting the pathfinder
This commit is contained in:
parent
f6fac5773d
commit
7a961eed9f
@ -59,9 +59,12 @@ public abstract class EntityCreature extends LivingEntity {
|
||||
pathFinder.reset();
|
||||
} else {
|
||||
final float speed = getAttributeValue(Attribute.MOVEMENT_SPEED);
|
||||
Position targetPosition = pathingEntity.getTargetPosition();
|
||||
final Position targetPosition = pathingEntity.getTargetPosition();
|
||||
moveTowards(targetPosition, speed);
|
||||
}
|
||||
} else {
|
||||
// TODO not call this every tick (code above with #done() is never called)
|
||||
pathFinder.reset();
|
||||
}
|
||||
|
||||
super.update(time);
|
||||
|
Loading…
Reference in New Issue
Block a user