mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Fix fence false positive with vertical Speed, fixed console nag about floodgate depend
This commit is contained in:
1 parent
64788fb1a0
commit
6fabd73432
3 files changed
+16
-15
No files matched your search
@@ -380,7 +380,7 @@ public final class SpeedCheck {
|
||||
Utilities.couldBeOnBoat(player),
|
||||
Utilities.isClimbableBlock(distance.getFrom().getBlock())
|
||||
|| Utilities.isClimbableBlock(distance.getFrom().getBlock().getRelative(BlockFace.DOWN)),
|
||||
movementManager.halfMovement, checksConfig);
|
||||
(movementManager.halfMovement || Utilities.isNearWall(distance.getFrom())), checksConfig);
|
||||
// Fix false positive with soulsand boost
|
||||
if (movementManager.nearLiquidTicks > 6) {
|
||||
maxMotionY *= 1.0525D;
|
||||
@@ -407,7 +407,7 @@ public final class SpeedCheck {
|
||||
// TODO config for these values
|
||||
// TODO something funky vanilla stuff going on with 0.42, like 0.445.., check
|
||||
// this..
|
||||
double base = couldBeOnBoat ? 0.600000025 : (nearBed ? 0.5625 : ((halfMovement) ? 0.6 : 0.42));
|
||||
double base = couldBeOnBoat ? 0.6f : (nearBed ? 0.5625f : ((halfMovement) ? 0.6f : 0.42f));
|
||||
if (fromClimbable) {
|
||||
base += checksConfig.getDouble(CheckType.SPEED, "verticalSpeed", "climbableCompensation"); // Default 0.04
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ public final class Utilities {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return isSlab(block) || isStair(block) || isWall(block) || block.getType() == Material.SNOW
|
||||
return isSlab(block) || isStair(block) || isWall(block) || block.getType() == XMaterial.SNOW.parseMaterial()
|
||||
|| block.getType().name().endsWith("HEAD");
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ public final class Utilities {
|
||||
* @param block block to check
|
||||
* @return true if stair
|
||||
*/
|
||||
public static boolean isStair(Block block) {
|
||||
public static boolean isStair(final Block block) {
|
||||
Material type = block.getType();
|
||||
return type.name().endsWith("STAIRS");
|
||||
}
|
||||
@@ -368,19 +368,20 @@ public final class Utilities {
|
||||
* @param block block to check
|
||||
* @return true if wall
|
||||
*/
|
||||
public static boolean isWall(Block block) {
|
||||
public static boolean isWall(final Block block) {
|
||||
Material type = block.getType();
|
||||
return type.name().endsWith("WALL") || type.name().endsWith("FENCE");
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether a player is sprinting or flying
|
||||
*
|
||||
* @param player player to check
|
||||
* @return true if sprinting or flying
|
||||
*/
|
||||
public static boolean sprintFly(Player player) {
|
||||
return player.isSprinting() || player.isFlying();
|
||||
|
||||
public static boolean isNearWall(final Location location) {
|
||||
return isWall(location.getBlock()) || isWall(location.getBlock().getRelative(BlockFace.NORTH))
|
||||
|| isWall(location.getBlock().getRelative(BlockFace.SOUTH))
|
||||
|| isWall(location.getBlock().getRelative(BlockFace.EAST))
|
||||
|| isWall(location.getBlock().getRelative(BlockFace.WEST))
|
||||
|| isWall(location.getBlock().getRelative(BlockFace.NORTH_EAST))
|
||||
|| isWall(location.getBlock().getRelative(BlockFace.NORTH_WEST))
|
||||
|| isWall(location.getBlock().getRelative(BlockFace.SOUTH_EAST))
|
||||
|| isWall(location.getBlock().getRelative(BlockFace.SOUTH_WEST));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@ description: AntiCheatReloaded helps easily identify and block malicious players
|
||||
main: com.rammelkast.anticheatreloaded.AntiCheatReloaded
|
||||
api-version: 1.13
|
||||
depend: [ProtocolLib]
|
||||
softdepend: [Floodgate]
|
||||
softdepend: [Floodgate, floodgate]
|
||||
startup: postworld
|
||||
version: ${project.build.version}
|
||||
commands:
|
||||
|
||||
Reference in new issue
Block a user