From 0412298555094c905837618c8ec2e2123a6fd9ba Mon Sep 17 00:00:00 2001 From: Leijurv Date: Tue, 11 Sep 2018 19:05:45 -0700 Subject: [PATCH] don't try to place against water, actually fixes #155 --- .../baritone/pathing/movement/movements/MovementTraverse.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/baritone/pathing/movement/movements/MovementTraverse.java b/src/main/java/baritone/pathing/movement/movements/MovementTraverse.java index 67430d05..9ee084ae 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementTraverse.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementTraverse.java @@ -115,6 +115,9 @@ public class MovementTraverse extends Movement { if (srcDown == Blocks.SOUL_SAND || (srcDown instanceof BlockSlab && !((BlockSlab) srcDown).isDouble())) { return COST_INF; // can't sneak and backplace against soul sand or half slabs =/ } + if (srcDown == Blocks.FLOWING_WATER || srcDown == Blocks.WATER) { + return COST_INF; // this is obviously impossible + } WC = WC * SNEAK_ONE_BLOCK_COST / WALK_ONE_BLOCK_COST;//since we are placing, we are sneaking return WC + context.placeBlockCost() + getTotalHardnessOfBlocksToBreak(context); }