mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-16 16:36:59 +00: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:
parent
19595c5847
commit
1e7bf9a46c
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue