From c1af050fa64196293e1609f5b5b8f689fe4e7e67 Mon Sep 17 00:00:00 2001 From: leijurv Date: Thu, 4 Oct 2018 16:00:02 -0700 Subject: [PATCH] fix lilypad fall cost, fixes #207 --- .../baritone/pathing/movement/movements/MovementDescend.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/pathing/movement/movements/MovementDescend.java b/src/main/java/baritone/pathing/movement/movements/MovementDescend.java index 79d5a305..b4e41597 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementDescend.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementDescend.java @@ -127,7 +127,9 @@ public class MovementDescend extends Movement { } IBlockState ontoBlock = BlockStateInterface.get(destX, newY, destZ); double tentativeCost = WALK_OFF_BLOCK_COST + FALL_N_BLOCKS_COST[fallHeight] + frontBreak; - if (ontoBlock.getBlock() == Blocks.WATER && !BlockStateInterface.isFlowing(ontoBlock)) { // TODO flowing check required here? + if (ontoBlock.getBlock() == Blocks.WATER && !BlockStateInterface.isFlowing(ontoBlock) && BlockStateInterface.getBlock(destX, newY + 1, destZ) != Blocks.WATERLILY) { // TODO flowing check required here? + // lilypads are canWalkThrough, but we can't end a fall that should be broken by water if it's covered by a lilypad + // however, don't return impossible in the lilypad scenario, because we could still jump right on it (water that's below a lilypad is canWalkOn so it works) if (Baritone.settings().assumeWalkOnWater.get()) { return IMPOSSIBLE; // TODO fix }