mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-03 19:15:44 +00:00
Stop searching for tp location after a chunk.
This commit is contained in:
parent
a21d80ecd8
commit
1fbed62c1d
1 changed files with 5 additions and 6 deletions
|
@ -227,11 +227,6 @@ 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;
|
||||||
|
@ -257,6 +252,10 @@ public class Util
|
||||||
{
|
{
|
||||||
y = 127;
|
y = 127;
|
||||||
x += 1;
|
x += 1;
|
||||||
|
if (x - 16 > loc.getBlockX())
|
||||||
|
{
|
||||||
|
throw new Exception(Util.i18n("holeInFloor"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new Location(world, x + 0.5D, y, z + 0.5D, loc.getYaw(), loc.getPitch());
|
return new Location(world, x + 0.5D, y, z + 0.5D, loc.getYaw(), loc.getPitch());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue