diff --git a/src/main/java/baritone/pathing/path/PathExecutor.java b/src/main/java/baritone/pathing/path/PathExecutor.java index 7e4f76a3..17fa788d 100644 --- a/src/main/java/baritone/pathing/path/PathExecutor.java +++ b/src/main/java/baritone/pathing/path/PathExecutor.java @@ -73,8 +73,8 @@ public class PathExecutor implements IPathExecutor, Helper { private HashSet toPlace = new HashSet<>(); private HashSet toWalkInto = new HashSet<>(); - private PathingBehavior behavior; - private IPlayerContext ctx; + private final PathingBehavior behavior; + private final IPlayerContext ctx; private boolean sprintNextTick; @@ -397,11 +397,20 @@ public class PathExecutor implements IPathExecutor, Helper { return true; } if (canSprintFromDescendInto(ctx, current, next)) { + + if (next instanceof MovementDescend && pathPosition < path.length() - 3) { + IMovement next_next = path.movements().get(pathPosition + 2); + if (next_next instanceof MovementDescend && !canSprintFromDescendInto(ctx, next, next_next)) { + return false; + } + + } if (ctx.playerFeet().equals(current.getDest())) { pathPosition++; onChangeInPathPosition(); onTick(); } + return true; } //logDebug("Turning off sprinting " + movement + " " + next + " " + movement.getDirection() + " " + next.getDirection().down() + " " + next.getDirection().down().equals(movement.getDirection()));