Skip to content

Commit

Permalink
Disable fallback location for wander
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jul 10, 2023
1 parent d0abea6 commit 33571d7
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import net.citizensnpcs.api.CitizensAPI;
import net.citizensnpcs.api.ai.GoalController.GoalEntry;
import net.citizensnpcs.api.ai.goals.WanderGoal;
import net.citizensnpcs.api.astar.pathfinder.MinecraftBlockExaminer;
import net.citizensnpcs.api.command.CommandContext;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.persistence.Persist;
Expand Down Expand Up @@ -268,8 +267,6 @@ public void onSpawn(NPC npc) {
this.npc = npc;
if (currentGoal == null) {
currentGoal = WanderGoal.builder(npc).xrange(xrange).yrange(yrange).pathfind(pathfind)
.fallback(n -> MinecraftBlockExaminer.findValidLocation(n.getStoredLocation(), xrange, yrange,
currentGoal.blockFilter()))
.tree(() -> regionCentres.isEmpty() ? null : tree).delay(delay)
.worldguardRegion(() -> getWorldGuardRegion()).build();
if (paused) {
Expand Down

0 comments on commit 33571d7

Please sign in to comment.