From f286c400a3d8904657104b098ab3d713c01d66f8 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Mon, 5 Nov 2018 13:47:00 -0800 Subject: [PATCH] when parkouring from soul sand, the maximum gap should be 1, fixes #247 --- .../movement/movements/MovementParkour.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/baritone/pathing/movement/movements/MovementParkour.java b/src/main/java/baritone/pathing/movement/movements/MovementParkour.java index dbcf3a59..68bddae0 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementParkour.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementParkour.java @@ -93,7 +93,17 @@ public class MovementParkour extends Movement { if (!MovementHelper.fullyPassable(x, y + 2, z)) { return; } - for (int i = 2; i <= (context.canSprint() ? 4 : 3); i++) { + int maxJump; + if (standingOn.getBlock() == Blocks.SOUL_SAND) { + maxJump = 2; // 1 block gap + } else { + if (context.canSprint()) { + maxJump = 4; + } else { + maxJump = 3; + } + } + for (int i = 2; i <= maxJump; i++) { // TODO perhaps dest.up(3) doesn't need to be fullyPassable, just canWalkThrough, possibly? for (int y2 = 0; y2 < 4; y2++) { if (!MovementHelper.fullyPassable(x + xDiff * i, y + y2, z + zDiff * i)) { @@ -108,7 +118,7 @@ public class MovementParkour extends Movement { return; } } - if (!context.canSprint()) { + if (maxJump != 4) { return; } if (!Baritone.settings().allowParkourPlace.get()) {