From 5650c86a7d52f510ed36637850b92ceb21588e54 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Mon, 24 Sep 2018 10:17:01 -0700 Subject: [PATCH] update goal in new thread --- src/main/java/baritone/behavior/MineBehavior.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/baritone/behavior/MineBehavior.java b/src/main/java/baritone/behavior/MineBehavior.java index ccee818f..e429f956 100644 --- a/src/main/java/baritone/behavior/MineBehavior.java +++ b/src/main/java/baritone/behavior/MineBehavior.java @@ -21,11 +21,11 @@ import baritone.Baritone; import baritone.api.behavior.IMineBehavior; import baritone.api.event.events.PathEvent; import baritone.api.event.events.TickEvent; +import baritone.api.pathing.goals.Goal; import baritone.cache.CachedChunk; import baritone.cache.ChunkPacker; import baritone.cache.WorldProvider; import baritone.cache.WorldScanner; -import baritone.api.pathing.goals.Goal; import baritone.pathing.goals.GoalBlock; import baritone.pathing.goals.GoalComposite; import baritone.pathing.goals.GoalTwoBlocks; @@ -78,7 +78,7 @@ public final class MineBehavior extends Behavior implements IMineBehavior, Helpe int mineGoalUpdateInterval = Baritone.settings().mineGoalUpdateInterval.get(); if (mineGoalUpdateInterval != 0) { if (event.getCount() % mineGoalUpdateInterval == 0) { - updateGoal(); + Baritone.INSTANCE.getExecutor().execute(this::updateGoal); } } PathingBehavior.INSTANCE.revalidateGoal();