Set pathfind on wander spawn

This commit is contained in:
fullwall 2023-07-08 21:52:24 +08:00
parent 8c35505444
commit ecc5239899
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ public class WanderWaypointProvider implements WaypointProvider {
public void onSpawn(NPC npc) {
this.npc = npc;
if (currentGoal == null) {
currentGoal = WanderGoal.builder(npc).xrange(xrange).yrange(yrange)
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)