Tightened velocity check, fixed issues with slime block

This commit is contained in:
Rammelkast committed 2020-04-23 19:37:47 +02:00
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));
}
/**
+1 -1
View File
@@ -246,7 +246,7 @@ MOREPACKETS_LIMIT: 30
MOREPACKETS_AVERAGE_PING: 80
# Maximum amount zero-velocity moments before a player is suspected
# Increase this in case of false positives
VELOCITY_MAX_FLAGS: 5
VELOCITY_MAX_FLAGS: 3
# The maximum angle difference allowed when attacking
# Increase this in case of false positives
KILLAURA_MAX_ANGLE_DIFFERENCE: 50