From 84e2efd42c5be1307de11f3c444b8bcfa4f6332f Mon Sep 17 00:00:00 2001 From: Biscuit <20166775+biscuut@users.noreply.github.com> Date: Mon, 15 Feb 2021 14:21:03 -0500 Subject: [PATCH] Fixed incorrect block pos world coordinates Fix block pos being incorrect when converting chunk coordinates to world coordinates because of order of operations. --- src/main/java/baritone/cache/ChunkPacker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/baritone/cache/ChunkPacker.java b/src/main/java/baritone/cache/ChunkPacker.java index bfeeabd7..ebd2fdaf 100644 --- a/src/main/java/baritone/cache/ChunkPacker.java +++ b/src/main/java/baritone/cache/ChunkPacker.java @@ -123,7 +123,7 @@ public final class ChunkPacker { return PathingBlockType.AVOID; } if (x == 0 || x == 15 || z == 0 || z == 15) { - if (BlockLiquid.getSlopeAngle(chunk.getWorld(), new BlockPos(x + chunk.x << 4, y, z + chunk.z << 4), state.getMaterial(), state) == -1000.0F) { + if (BlockLiquid.getSlopeAngle(chunk.getWorld(), new BlockPos(x + (chunk.x << 4), y, z + (chunk.z << 4)), state.getMaterial(), state) == -1000.0F) { return PathingBlockType.WATER; } return PathingBlockType.AVOID;