stop sprinting off ledges, fixes #110

This commit is contained in:
Leijurv 2018-08-30 16:43:05 -07:00
parent 606581b044
commit aa3a8338e6
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -21,6 +21,7 @@ import baritone.Baritone;
import baritone.api.event.events.TickEvent; import baritone.api.event.events.TickEvent;
import baritone.pathing.movement.ActionCosts; import baritone.pathing.movement.ActionCosts;
import baritone.pathing.movement.Movement; import baritone.pathing.movement.Movement;
import baritone.pathing.movement.MovementHelper;
import baritone.pathing.movement.MovementState; import baritone.pathing.movement.MovementState;
import baritone.pathing.movement.movements.MovementDescend; import baritone.pathing.movement.movements.MovementDescend;
import baritone.pathing.movement.movements.MovementDiagonal; import baritone.pathing.movement.movements.MovementDiagonal;
@ -285,7 +286,7 @@ public class PathExecutor implements Helper {
} }
} }
if (next instanceof MovementTraverse) { 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())) { if (playerFeet().equals(movement.getDest())) {
pathPosition++; pathPosition++;
Baritone.INSTANCE.getInputOverrideHandler().clearAllKeys(); Baritone.INSTANCE.getInputOverrideHandler().clearAllKeys();