mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-08 00:11:34 +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();
|
pathFinder.reset();
|
||||||
} else {
|
} else {
|
||||||
final float speed = getAttributeValue(Attribute.MOVEMENT_SPEED);
|
final float speed = getAttributeValue(Attribute.MOVEMENT_SPEED);
|
||||||
Position targetPosition = pathingEntity.getTargetPosition();
|
final Position targetPosition = pathingEntity.getTargetPosition();
|
||||||
moveTowards(targetPosition, speed);
|
moveTowards(targetPosition, speed);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// TODO not call this every tick (code above with #done() is never called)
|
||||||
|
pathFinder.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
super.update(time);
|
super.update(time);
|
||||||
|
Loading…
Reference in New Issue
Block a user