From b30ed308ae82d190303baaf74ed819dade0c62bc Mon Sep 17 00:00:00 2001 From: Hea3veN Date: Fri, 24 Apr 2015 00:00:55 -0300 Subject: [PATCH] fix a robot error on void worlds or worlds with holes in bedrock --- common/buildcraft/core/lib/utils/PathFinding.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/buildcraft/core/lib/utils/PathFinding.java b/common/buildcraft/core/lib/utils/PathFinding.java index 6e8d106d..003a85f6 100755 --- a/common/buildcraft/core/lib/utils/PathFinding.java +++ b/common/buildcraft/core/lib/utils/PathFinding.java @@ -243,7 +243,9 @@ public class PathFinding implements IIterableAlgorithm { int y = from.index.y + dy; int z = from.index.z + dz; - if (endReached(x, y, z)) { + if (y < 0) { + resultMoves[dx + 1][dy + 1][dz + 1] = 0; + } else if (endReached(x, y, z)) { resultMoves[dx + 1][dy + 1][dz + 1] = 2; } else if (!BuildCraftAPI.isSoftBlock(world, x, y, z)) { resultMoves[dx + 1][dy + 1][dz + 1] = 0;