mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Tightened velocity check, fixed issues with slime block
This commit is contained in:
1 parent
27bb684736
commit
df3c410436
3 files changed
+4
-3
No files matched your search
@@ -278,7 +278,8 @@ public class Backend {
|
||||
public CheckResult checkYSpeed(Player player, double y) {
|
||||
if (!isMovingExempt(player) && !player.isInsideVehicle() && !player.isSleeping() && (y > magic.Y_SPEED_MAX())
|
||||
&& !isDoing(player, velocitized, magic.VELOCITY_TIME())
|
||||
&& !player.hasPotionEffect(PotionEffectType.JUMP) && !VersionUtil.isFlying(player)) {
|
||||
&& !player.hasPotionEffect(PotionEffectType.JUMP) && !VersionUtil.isFlying(player)
|
||||
&& !Utilities.isSlime(player.getLocation().getBlock())) {
|
||||
return new CheckResult(CheckResult.Result.FAILED,
|
||||
"y speed was too high (speed=" + y + ", max=" + magic.Y_SPEED_MAX() + ")");
|
||||
} else {
|
||||
|
||||
@@ -118,7 +118,7 @@ public final class Utilities {
|
||||
|
||||
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));
|
||||
&& !isSlime(block.getRelative(BlockFace.SOUTH)) && !isSlime(block.getRelative(BlockFace.WEST)) && !isSlime(block.getRelative(BlockFace.DOWN));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user