1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-01 12:20:59 +02:00

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 78a4c8fe44
commit 3c2cdd812e

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