mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-19 09:06:09 +01:00
[Fix] Check initial direction when looking for a safe teleport spot
This commit is contained in:
parent
59f67acfd0
commit
3042151fee
@ -274,7 +274,6 @@ public class Util
|
||||
AIR_MATERIALS.add(Material.VINE.getId());
|
||||
AIR_MATERIALS.add(Material.FENCE_GATE.getId());
|
||||
AIR_MATERIALS.add(Material.WATER_LILY.getId());
|
||||
AIR_MATERIALS.add(Material.NETHER_FENCE.getId());
|
||||
AIR_MATERIALS.add(Material.NETHER_WARTS.getId());
|
||||
|
||||
for (Integer integer : AIR_MATERIALS)
|
||||
@ -358,7 +357,13 @@ public class Util
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isBlockUnsafe(world, x, y, z))
|
||||
{
|
||||
x = Math.round(loc.getX()) == origX ? x - 1 : x + 1;
|
||||
z = Math.round(loc.getZ()) == origZ ? z - 1 : z + 1;
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
while (isBlockUnsafe(world, x, y, z))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user