mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-05 14:18:21 +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:
@@ -227,12 +227,17 @@ public class Util
|
|||||||
int y = loc.getBlockY();
|
int y = loc.getBlockY();
|
||||||
int z = loc.getBlockZ();
|
int z = loc.getBlockZ();
|
||||||
|
|
||||||
|
if (isBlockAboveAir(world, x, y, z) && (y < 125))
|
||||||
|
{
|
||||||
|
y += 2;
|
||||||
|
}
|
||||||
|
|
||||||
while (isBlockAboveAir(world, x, y, z))
|
while (isBlockAboveAir(world, x, y, z))
|
||||||
{
|
{
|
||||||
y -= 1;
|
y -= 1;
|
||||||
if (y < 0)
|
if (y < 0)
|
||||||
{
|
{
|
||||||
throw new Exception(Util.i18n("holeInFloor"));
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user