mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Fixed flight, speed, strafe false positives near boats
This commit is contained in:
1 parent
0d50bc3b52
commit
45712a8f62
4 files changed
+4
-4
No files matched your search
@@ -136,7 +136,7 @@ public class FlightCheck {
|
||||
|| Utilities.isNearBed(distance.getTo().clone().add(0, -0.51, 0)))
|
||||
&& movementManager.motionY > 0.15))
|
||||
&& movementManager.slimeInfluenceTicks == 0 && movementManager.elytraEffectTicks <= 25
|
||||
&& !Utilities.couldBeOnBoat(player, 0.6d, false))
|
||||
&& !Utilities.couldBeOnBoat(player, 0.8d, false))
|
||||
return new CheckResult(CheckResult.Result.FAILED, "AirClimb",
|
||||
"tried to climb air (mY=" + movementManager.motionY + ")");
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ public class SpeedCheck {
|
||||
// Works against YPorts and mini jumps
|
||||
if (checksConfig.isSubcheckEnabled(CheckType.SPEED, "jumpBehaviour") && movementManager.touchedGroundThisTick
|
||||
&& !boxedIn && movementManager.slimeInfluenceTicks <= 10 && !Utilities.isNearHalfblock(movingTowards)
|
||||
&& !Utilities.isNearHalfblock(movingTowards.clone().subtract(0, 0.51, 0))) {
|
||||
&& !Utilities.isNearHalfblock(movingTowards.clone().subtract(0, 0.51, 0)) && !Utilities.couldBeOnBoat(player, 0.8d, false)) {
|
||||
// This happens naturally
|
||||
if (movementManager.airTicksBeforeGrounded == movementManager.groundTicks) {
|
||||
double minimumDistXZ = checksConfig.getDouble(CheckType.SPEED, "jumpBehaviour", "minimumDistXZ"); // Default
|
||||
|
||||
@@ -53,7 +53,7 @@ public class StrafeCheck {
|
||||
|
||||
if (System.currentTimeMillis() - movementManager.lastTeleport <= checksConfig.getInteger(CheckType.STRAFE,
|
||||
"accountForTeleports") || movementManager.elytraEffectTicks >= 20
|
||||
|| movementManager.halfMovementHistoryCounter >= 20)
|
||||
|| movementManager.halfMovementHistoryCounter >= 20 || Utilities.couldBeOnBoat(player, 0.5d, false))
|
||||
return PASS;
|
||||
|
||||
Vector oldAcceleration = new Vector(movementManager.lastDistanceX, 0, movementManager.lastDistanceZ);
|
||||
|
||||
@@ -128,7 +128,7 @@ public final class Utilities {
|
||||
public static boolean couldBeOnBoat(Player player, double range, boolean checkY) {
|
||||
for (Entity entity : player.getNearbyEntities(range, range, range)) {
|
||||
if (entity instanceof Boat) {
|
||||
if (((Boat) entity).getLocation().getY() < player.getLocation().getY() + 0.25) {
|
||||
if (((Boat) entity).getLocation().getY() < player.getLocation().getY() + 0.35) {
|
||||
return true;
|
||||
} else if (!checkY) {
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user