properly set isSafeToCancel in MovementDiagonal, fixes #1788
This commit is contained in:
parent
9851623557
commit
02e7886e77
@ -56,6 +56,14 @@ public class MovementDiagonal extends Movement {
|
||||
super(baritone, start, end, new BetterBlockPos[]{dir1, dir1.up(), dir2, dir2.up(), end, end.up()});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean safeToCancel(MovementState state) {
|
||||
return ctx.playerFeet().equals(src) || ((
|
||||
MovementHelper.canWalkOn(ctx, new BlockPos(src.x, src.y - 1, dest.z))
|
||||
) &&
|
||||
MovementHelper.canWalkOn(ctx, new BlockPos(dest.x, src.y - 1, src.z)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public double calculateCost(CalculationContext context) {
|
||||
MutableMoveResult result = new MutableMoveResult();
|
||||
|
Loading…
Reference in New Issue
Block a user