mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-24 10:09:50 +01:00
Stop searching for tp location after a chunk.
This commit is contained in:
parent
a21d80ecd8
commit
1fbed62c1d
@ -226,12 +226,7 @@ public class Util
|
||||
int x = loc.getBlockX();
|
||||
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;
|
||||
@ -257,6 +252,10 @@ public class Util
|
||||
{
|
||||
y = 127;
|
||||
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());
|
||||
|
Loading…
Reference in New Issue
Block a user