Skip to content

Commit

Permalink
Force finish should work for pathfind and non pathfind states
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jul 9, 2023
1 parent fd1f177 commit 9265f6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/citizensnpcs/api/ai/goals/WanderGoal.java
Expand Up @@ -108,10 +108,10 @@ public void reset() {

@Override
public BehaviorStatus run() {
if (paused)
if (paused || forceFinish)
return BehaviorStatus.SUCCESS;
if (pathfind) {
if (!npc.getNavigator().isNavigating() || forceFinish) {
if (!npc.getNavigator().isNavigating()) {
return BehaviorStatus.SUCCESS;
}
} else {
Expand Down

0 comments on commit 9265f6c

Please sign in to comment.