From 67c5a9caa02fc18b048d8dc419c16fa7b0f721f4 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sat, 15 Sep 2018 09:29:03 -0700 Subject: [PATCH] fix failure to break on fall --- .../pathing/movement/movements/MovementFall.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/baritone/pathing/movement/movements/MovementFall.java b/src/main/java/baritone/pathing/movement/movements/MovementFall.java index 7875a937..60a5a0a5 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementFall.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementFall.java @@ -165,6 +165,16 @@ public class MovementFall extends Movement { @Override protected boolean prepared(MovementState state) { + if (state.getStatus() == MovementStatus.WAITING) { + return true; + } + // only break if one of the first three needs to be broken + // specifically ignore the last one which might be water + for (int i = 0; i < 4 && i < positionsToBreak.length; i++) { + if (!MovementHelper.canWalkThrough(positionsToBreak[i])) { + return super.prepared(state); + } + } return true; } }