mirror of
https://github.com/cabaletta/baritone
synced 2024-12-27 09:22:20 +00:00
fix failure to break on fall
This commit is contained in:
parent
20ecab7d53
commit
67c5a9caa0
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user