Fixed YAxis false positive, added BadPackets check and cleaned up code and README .

This commit is contained in:
Rammelkast committed 2020-04-23 16:47:25 +02:00
1 parent 76c595e255
commit 9771387909
20 files changed
+600 -323

No files matched your search

@@ -112,6 +112,15 @@ public final class Utilities {
return !(block.isLiquid() || block.getType() == Material.AIR);
}
public static boolean isSlime(Block block) {
return block.getType() == Material.SLIME_BLOCK;
}
public static boolean isNotNearSlime(Block block) {
return !isSlime(block.getRelative(BlockFace.NORTH)) && !isSlime(block.getRelative(BlockFace.EAST))
&& !isSlime(block.getRelative(BlockFace.SOUTH)) && !isSlime(block.getRelative(BlockFace.WEST));
}
/**
* Determine whether a player is fully submerged in water
*
@@ -551,6 +560,13 @@ public final class Utilities {
float error = Math.max(dividend, divisor) * 1E-3F;
return (int) (ans + error);
}
public static boolean isHoneyBlock(Block block) {
if (!VersionUtil.isOfVersion("v1_15")) {
return false;
}
return block.getType() == Material.HONEY_BLOCK;
}
static {
// Start 1.8.8