1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-18 20:41:37 +02:00

[Port] Check initial direction when looking for a safe teleport spot

This commit is contained in:
GunfighterJ
2013-05-10 11:29:37 -05:00
parent b55b358cce
commit 03c47f1f8a

View File

@@ -135,6 +135,12 @@ public class LocationUtil
}
}
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))
{