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 committed by asiekierka
parent 1e9e3f0b02
commit 3f19711b60

View file

@ -240,7 +240,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;