pause when current best is a backtrack, fixes #201

This commit is contained in:
Leijurv
2018-10-06 18:39:30 -07:00
parent e4ef659756
commit 939e9c32d5
5 changed files with 53 additions and 2 deletions

View File

@@ -319,6 +319,14 @@ public class MovementTraverse extends Movement {
}
}
@Override
public boolean safeToCancel(MovementState state) {
// if we're in the process of breaking blocks before walking forwards
// or if this isn't a sneak place (the block is already there)
// then it's safe to cancel this
return state.getStatus() != MovementState.MovementStatus.RUNNING || MovementHelper.canWalkOn(dest.down());
}
@Override
protected boolean prepared(MovementState state) {
if (playerFeet().equals(src) || playerFeet().equals(src.down())) {