fix a robot error on void worlds or worlds with holes in bedrock

This commit is contained in:
Hea3veN 2015-04-24 00:00:55 -03:00
parent e895b56841
commit b30ed308ae

View file

@ -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;