mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-23 16:41:43 +01:00
Set pathfind on wander spawn
This commit is contained in:
parent
8c35505444
commit
ecc5239899
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user