From 21568f593a41a0da191d5f3eb2cb3a6e30bdf67d Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 20 Sep 2018 21:27:25 -0700 Subject: [PATCH] fix goal offset logic --- src/main/java/baritone/behavior/MineBehavior.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/baritone/behavior/MineBehavior.java b/src/main/java/baritone/behavior/MineBehavior.java index 56aa5738..c5fd1534 100644 --- a/src/main/java/baritone/behavior/MineBehavior.java +++ b/src/main/java/baritone/behavior/MineBehavior.java @@ -113,16 +113,16 @@ public final class MineBehavior extends Behavior implements Helper { return new GoalTwoBlocks(loc); } - boolean noUp = locs.contains(loc.up()) && !(Baritone.settings().internalMiningAirException.get() && BlockStateInterface.getBlock(loc.up()) == Blocks.AIR); - boolean noDown = locs.contains(loc.down()) && !(Baritone.settings().internalMiningAirException.get() && BlockStateInterface.getBlock(loc.up()) == Blocks.AIR); - if (noUp) { - if (noDown) { + boolean upwardGoal = locs.contains(loc.up()) || (Baritone.settings().internalMiningAirException.get() && BlockStateInterface.getBlock(loc.up()) == Blocks.AIR); + boolean downwardGoal = locs.contains(loc.down()) || (Baritone.settings().internalMiningAirException.get() && BlockStateInterface.getBlock(loc.up()) == Blocks.AIR); + if (upwardGoal) { + if (downwardGoal) { return new GoalTwoBlocks(loc); } else { return new GoalBlock(loc); } } else { - if (noDown) { + if (downwardGoal) { return new GoalBlock(loc.down()); } else { return new GoalTwoBlocks(loc);