From 7473e34602a32324714d3d603007b5d78043e040 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Mon, 3 Sep 2018 09:24:44 -0700 Subject: [PATCH] check for top or double slab --- .../pathing/movement/movements/MovementAscend.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/baritone/pathing/movement/movements/MovementAscend.java b/src/main/java/baritone/pathing/movement/movements/MovementAscend.java index bc94ca48..46162806 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementAscend.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementAscend.java @@ -189,8 +189,11 @@ public class MovementAscend extends Movement { return state.setStatus(MovementStatus.UNREACHABLE); } MovementHelper.moveTowards(state, dest); - if (jumpingOnto.getBlock() instanceof BlockSlab && !((BlockSlab) jumpingOnto.getBlock()).isDouble() && jumpingOnto.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM && !(BlockStateInterface.get(src.down()).getBlock() instanceof BlockSlab)) { - return state; // don't jump while walking from a non slab into a bottom slab + if (jumpingOnto.getBlock() instanceof BlockSlab && !((BlockSlab) jumpingOnto.getBlock()).isDouble() && jumpingOnto.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM) { + IBlockState from = BlockStateInterface.get(src.down()); + if (!(from.getBlock() instanceof BlockSlab) || ((BlockSlab) from.getBlock()).isDouble() || from.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP) { + return state; // don't jump while walking from a non double slab into a bottom slab + } } if (headBonkClear()) {