EntityCreature#setPathTo does reset the previous path everytime

This commit is contained in:
Felix Cravic 2020-07-31 22:17:24 +02:00
parent 7a961eed9f
commit 79226cf7e7

View File

@ -287,8 +287,8 @@ public abstract class EntityCreature extends LivingEntity {
* @param position the position to find the path to, null to reset the pathfinder * @param position the position to find the path to, null to reset the pathfinder
*/ */
public void setPathTo(Position position) { public void setPathTo(Position position) {
this.pathFinder.reset();
if (position == null) { if (position == null) {
this.pathFinder.reset();
return; return;
} }
position = position.clone(); position = position.clone();