mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Fixed YAxis false positive, added BadPackets check and cleaned up code and README .
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user