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:
@@ -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))
|
||||
{
|
||||
|
Reference in New Issue
Block a user