Skip to content

Commit

Permalink
Use new builder style WanderGoal
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jun 29, 2022
1 parent d761763 commit 58da848
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -313,8 +313,8 @@ public void onRemove() {
public void onSpawn(NPC npc) {
this.npc = npc;
if (currentGoal == null) {
currentGoal = WanderGoal.createWithNPCAndRangeAndTreeAndFallbackAndRegion(npc, xrange, yrange,
WanderWaypointProvider.this, WanderWaypointProvider.this, getWorldGuardRegion());
currentGoal = WanderGoal.builder(npc).xrange(xrange).yrange(yrange).fallback(this).tree(this)
.worldguardRegion(getWorldGuardRegion()).build();
currentGoal.setDelay(delay);
}
Iterator<GoalEntry> itr = npc.getDefaultGoalController().iterator();
Expand Down

0 comments on commit 58da848

Please sign in to comment.