From b746e56631adf7ddf5048f31643277d830c29a76 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 6 Sep 2018 10:13:50 -0700 Subject: [PATCH] lol you can't jump with a ceiling above you --- .../movement/movements/MovementParkour.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/main/java/baritone/pathing/movement/movements/MovementParkour.java b/src/main/java/baritone/pathing/movement/movements/MovementParkour.java index 05a88ded..edae2abf 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementParkour.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementParkour.java @@ -66,11 +66,10 @@ public class MovementParkour extends Movement { } for (int i = 2; i <= 4; i++) { BlockPos dest = src.offset(dir, i); - if (!MovementHelper.fullyPassable(dest)) { - return null; - } - if (!MovementHelper.fullyPassable(dest.up())) { - return null; + for (int y = 0; y < 3; y++) { + if (!MovementHelper.fullyPassable(dest.up(y))) { + return null; + } } if (MovementHelper.canWalkOn(dest.down())) { return new MovementParkour(src, i, dir); @@ -102,11 +101,10 @@ public class MovementParkour extends Movement { } for (int i = 1; i <= 4; i++) { BlockPos d = src.offset(direction, i); - if (!MovementHelper.fullyPassable(d)) { - return COST_INF; - } - if (!MovementHelper.fullyPassable(d.up())) { - return COST_INF; + for (int y = 0; y < 3; y++) { + if (!MovementHelper.fullyPassable(d.up(y))) { + return COST_INF; + } } if (d.equals(dest)) { return costFromJumpDistance(i);