From 990107a1fa00fbdeb286d77ef3ec5cf5b6662bea Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 1 Nov 2018 20:27:34 -0700 Subject: [PATCH] simplify --- src/main/java/baritone/behavior/PathingBehavior.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/baritone/behavior/PathingBehavior.java b/src/main/java/baritone/behavior/PathingBehavior.java index d8bf9a1d..7a3a16b7 100644 --- a/src/main/java/baritone/behavior/PathingBehavior.java +++ b/src/main/java/baritone/behavior/PathingBehavior.java @@ -406,13 +406,9 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior, logDebug("no goal"); return Optional.empty(); } - if (Baritone.settings().simplifyUnloadedYCoord.get()) { - BlockPos pos = null; - if (goal instanceof IGoalRenderPos) { - pos = ((IGoalRenderPos) goal).getGoalPos(); - } - - if (pos != null && world().getChunk(pos) instanceof EmptyChunk) { + if (Baritone.settings().simplifyUnloadedYCoord.get() && goal instanceof IGoalRenderPos) { + BlockPos pos = ((IGoalRenderPos) goal).getGoalPos(); + if (world().getChunk(pos) instanceof EmptyChunk) { logDebug("Simplifying " + goal.getClass() + " to GoalXZ due to distance"); goal = new GoalXZ(pos.getX(), pos.getZ()); }