mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +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
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue