Removing hole in floor, tp cop-out.

This should force the code to find an suitable tp location.
- Not sure how well this will effect performance, but wanted to test it.
This commit is contained in:
KHobbits 2011-08-11 02:59:40 +01:00
parent 19595c5847
commit 1e7bf9a46c

View file

@ -227,12 +227,17 @@ public class Util
int y = loc.getBlockY();
int z = loc.getBlockZ();
if (isBlockAboveAir(world, x, y, z) && (y < 125))
{
y += 2;
}
while (isBlockAboveAir(world, x, y, z))
{
y -= 1;
if (y < 0)
{
throw new Exception(Util.i18n("holeInFloor"));
break;
}
}