mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
I think this should fix #199
This commit is contained in:
1 parent
38e6a5a99c
commit
2d827e951c
2 files changed
+19
-17
No files matched your search
@@ -150,7 +150,7 @@ public final 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.8d, false))
|
||||
&& !Utilities.couldBeOnBoat(player, 0.8, false))
|
||||
return new CheckResult(CheckResult.Result.FAILED, "AirClimb",
|
||||
"tried to climb air (mY=" + movementManager.motionY + ")");
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@ public final class Utilities {
|
||||
* @return true if the player should be unable to stand here
|
||||
*/
|
||||
public static boolean cantStandAtExp(final Location location) {
|
||||
return cantStandAt(new Location(location.getWorld(), fixXAxis(location.getX()), location.getY() - 0.01D,
|
||||
location.getBlockZ()).getBlock());
|
||||
return cantStandAt(new Location(location.getWorld(), location.getX(), location.getY() - 0.01D,
|
||||
location.getZ()).getBlock());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -159,14 +159,16 @@ public final class Utilities {
|
||||
* @return true if the player could be standing on ice
|
||||
*/
|
||||
public static boolean couldBeOnIce(final Location location) {
|
||||
return isNearIce(new Location(location.getWorld(), fixXAxis(location.getX()), location.getY() - 0.01D,
|
||||
location.getBlockZ()))
|
||||
|| isNearIce(new Location(location.getWorld(), fixXAxis(location.getX()), location.getY() - 0.26D,
|
||||
location.getBlockZ()));
|
||||
return isNearIce(new Location(location.getWorld(), location.getX(), location.getY() - 0.01D,
|
||||
location.getZ()))
|
||||
|| isNearIce(new Location(location.getWorld(), location.getX(), location.getY() - 0.26D,
|
||||
location.getZ()))
|
||||
|| isNearIce(new Location(location.getWorld(), location.getX(), location.getY() - 0.51D,
|
||||
location.getZ()));
|
||||
}
|
||||
|
||||
public static boolean isNearIce(final Location location) {
|
||||
return isCollisionPoint(location, material -> material.name().endsWith("ICE"));
|
||||
return isCollisionPoint(location, material -> material.name().toUpperCase().endsWith("ICE"));
|
||||
}
|
||||
|
||||
public static boolean isNearShulkerBox(final Location location) {
|
||||
@@ -174,7 +176,7 @@ public final class Utilities {
|
||||
if (MinecraftVersion.getCurrentVersion().isAtLeast(MinecraftVersion.COLOR_UPDATE)) {
|
||||
return false;
|
||||
}
|
||||
return isCollisionPoint(location, material -> material.name().endsWith("SHULKER_BOX"));
|
||||
return isCollisionPoint(location, material -> material.name().toUpperCase().endsWith("SHULKER_BOX"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -221,10 +223,10 @@ public final class Utilities {
|
||||
* @return true if the player could be standing on slime
|
||||
*/
|
||||
public static boolean couldBeOnSlime(final Location location) {
|
||||
return isNearSlime(new Location(location.getWorld(), fixXAxis(location.getX()), location.getY() - 0.01D,
|
||||
location.getBlockZ()))
|
||||
|| isNearSlime(new Location(location.getWorld(), fixXAxis(location.getX()), location.getY() - 0.51D,
|
||||
location.getBlockZ()));
|
||||
return isNearSlime(new Location(location.getWorld(), location.getX(), location.getY() - 0.01D,
|
||||
location.getZ()))
|
||||
|| isNearSlime(new Location(location.getWorld(), location.getX(), location.getY() - 0.51D,
|
||||
location.getZ()));
|
||||
}
|
||||
|
||||
public static boolean isNearSlime(final Location location) {
|
||||
@@ -238,10 +240,10 @@ public final class Utilities {
|
||||
* @return true if the player could be standing on soil
|
||||
*/
|
||||
public static boolean couldBeOnSoil(final Location location) {
|
||||
return isNearSoil(new Location(location.getWorld(), fixXAxis(location.getX()), location.getY() - 0.01D,
|
||||
location.getBlockZ()))
|
||||
|| isNearSoil(new Location(location.getWorld(), fixXAxis(location.getX()), location.getY() - 0.51D,
|
||||
location.getBlockZ()));
|
||||
return isNearSoil(new Location(location.getWorld(), location.getX(), location.getY() - 0.01D,
|
||||
location.getZ()))
|
||||
|| isNearSoil(new Location(location.getWorld(), location.getX(), location.getY() - 0.51D,
|
||||
location.getZ()));
|
||||
}
|
||||
|
||||
public static boolean isNearSoil(final Location location) {
|
||||
|
||||
Reference in new issue
Block a user