Skip to content

Commit

Permalink
Set pathfind on wander spawn
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jul 8, 2023
1 parent 8c35505 commit ecc5239
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -257,7 +257,7 @@ public void onRemove() {
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)
Expand Down

0 comments on commit ecc5239

Please sign in to comment.