mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-06 04:23:02 +00:00
Fix IllegalStateException in sign click patch
Cleanup
This commit is contained in:
parent
cf79a8fdca
commit
930eb7ae86
5 changed files with 101 additions and 9 deletions
|
@ -288,6 +288,7 @@ public class Util
|
|||
public final static int RADIUS = 3;
|
||||
public final static Vector3D[] VOLUME;
|
||||
|
||||
|
||||
public static class Vector3D
|
||||
{
|
||||
public Vector3D(int x, int y, int z)
|
||||
|
@ -397,6 +398,15 @@ public class Util
|
|||
}
|
||||
|
||||
public static boolean isBlockUnsafe(final World world, final int x, final int y, final int z)
|
||||
{
|
||||
if (isBlockDamaging(world, x, y, z))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return isBlockAboveAir(world, x, y, z);
|
||||
}
|
||||
|
||||
public static boolean isBlockDamaging(final World world, final int x, final int y, final int z)
|
||||
{
|
||||
final Block below = world.getBlockAt(x, y - 1, z);
|
||||
if (below.getType() == Material.LAVA || below.getType() == Material.STATIONARY_LAVA)
|
||||
|
@ -419,7 +429,7 @@ public class Util
|
|||
{
|
||||
return true;
|
||||
}
|
||||
return isBlockAboveAir(world, x, y, z);
|
||||
return false;
|
||||
}
|
||||
|
||||
public static ItemStack convertBlockToItem(final Block block)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue