From 04e7da9b73e104052b0493dff7a7bcdd6679d5b4 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Mon, 4 Feb 2019 13:07:05 -0800 Subject: [PATCH] lower walk into can be water, but not upper --- .../baritone/pathing/movement/movements/MovementDiagonal.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/baritone/pathing/movement/movements/MovementDiagonal.java b/src/main/java/baritone/pathing/movement/movements/MovementDiagonal.java index a47fc263..0abaccf7 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementDiagonal.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementDiagonal.java @@ -114,7 +114,7 @@ public class MovementDiagonal extends Movement { return; } IBlockState pb3 = context.get(destX, y + 1, z); - if (optionA == 0 && ((MovementHelper.avoidWalkingInto(pb2.getBlock()) && pb2.getBlock() != Blocks.WATER) || (MovementHelper.avoidWalkingInto(pb3.getBlock()) && pb3.getBlock() != Blocks.WATER))) { + if (optionA == 0 && ((MovementHelper.avoidWalkingInto(pb2.getBlock()) && pb2.getBlock() != Blocks.WATER) || MovementHelper.avoidWalkingInto(pb3.getBlock()))) { // at this point we're done calculating optionA, so we can check if it's actually possible to edge around in that direction return; } @@ -123,7 +123,7 @@ public class MovementDiagonal extends Movement { // and finally, if the cost is nonzero for both ways to approach this diagonal, it's not possible return; } - if (optionB == 0 && ((MovementHelper.avoidWalkingInto(pb0.getBlock()) && pb0.getBlock() != Blocks.WATER) || (MovementHelper.avoidWalkingInto(pb1.getBlock()) && pb1.getBlock() != Blocks.WATER))) { + if (optionB == 0 && ((MovementHelper.avoidWalkingInto(pb0.getBlock()) && pb0.getBlock() != Blocks.WATER) || MovementHelper.avoidWalkingInto(pb1.getBlock()))) { // and now that option B is fully calculated, see if we can edge around that way return; }