mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-19 14:41:34 +01:00
EntityCreature#setPathTo does reset the previous path everytime
This commit is contained in:
parent
7a961eed9f
commit
79226cf7e7
@ -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) {
|
||||||
if (position == null) {
|
|
||||||
this.pathFinder.reset();
|
this.pathFinder.reset();
|
||||||
|
if (position == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
position = position.clone();
|
position = position.clone();
|
||||||
|
Loading…
Reference in New Issue
Block a user