From aa3a8338e6962aca1565cbb063c51571306a92ad Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 30 Aug 2018 16:43:05 -0700 Subject: [PATCH] stop sprinting off ledges, fixes #110 --- src/main/java/baritone/pathing/path/PathExecutor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/pathing/path/PathExecutor.java b/src/main/java/baritone/pathing/path/PathExecutor.java index 1e977b92..76fcc3c1 100644 --- a/src/main/java/baritone/pathing/path/PathExecutor.java +++ b/src/main/java/baritone/pathing/path/PathExecutor.java @@ -21,6 +21,7 @@ import baritone.Baritone; import baritone.api.event.events.TickEvent; import baritone.pathing.movement.ActionCosts; import baritone.pathing.movement.Movement; +import baritone.pathing.movement.MovementHelper; import baritone.pathing.movement.MovementState; import baritone.pathing.movement.movements.MovementDescend; import baritone.pathing.movement.movements.MovementDiagonal; @@ -285,7 +286,7 @@ public class PathExecutor implements Helper { } } if (next instanceof MovementTraverse) { - if (next.getDirection().down().equals(movement.getDirection())) { + if (next.getDirection().down().equals(movement.getDirection()) && MovementHelper.canWalkOn(next.getDest().down())) { if (playerFeet().equals(movement.getDest())) { pathPosition++; Baritone.INSTANCE.getInputOverrideHandler().clearAllKeys();