mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 14:38:46 +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)))
|
|| Utilities.isNearBed(distance.getTo().clone().add(0, -0.51, 0)))
|
||||||
&& movementManager.motionY > 0.15))
|
&& movementManager.motionY > 0.15))
|
||||||
&& movementManager.slimeInfluenceTicks == 0 && movementManager.elytraEffectTicks <= 25
|
&& 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",
|
return new CheckResult(CheckResult.Result.FAILED, "AirClimb",
|
||||||
"tried to climb air (mY=" + movementManager.motionY + ")");
|
"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
|
* @return true if the player should be unable to stand here
|
||||||
*/
|
*/
|
||||||
public static boolean cantStandAtExp(final Location location) {
|
public static boolean cantStandAtExp(final Location location) {
|
||||||
return cantStandAt(new Location(location.getWorld(), fixXAxis(location.getX()), location.getY() - 0.01D,
|
return cantStandAt(new Location(location.getWorld(), location.getX(), location.getY() - 0.01D,
|
||||||
location.getBlockZ()).getBlock());
|
location.getZ()).getBlock());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -159,14 +159,16 @@ public final class Utilities {
|
|||||||
* @return true if the player could be standing on ice
|
* @return true if the player could be standing on ice
|
||||||
*/
|
*/
|
||||||
public static boolean couldBeOnIce(final Location location) {
|
public static boolean couldBeOnIce(final Location location) {
|
||||||
return isNearIce(new Location(location.getWorld(), fixXAxis(location.getX()), location.getY() - 0.01D,
|
return isNearIce(new Location(location.getWorld(), location.getX(), location.getY() - 0.01D,
|
||||||
location.getBlockZ()))
|
location.getZ()))
|
||||||
|| isNearIce(new Location(location.getWorld(), fixXAxis(location.getX()), location.getY() - 0.26D,
|
|| isNearIce(new Location(location.getWorld(), location.getX(), location.getY() - 0.26D,
|
||||||
location.getBlockZ()));
|
location.getZ()))
|
||||||
|
|| isNearIce(new Location(location.getWorld(), location.getX(), location.getY() - 0.51D,
|
||||||
|
location.getZ()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isNearIce(final Location location) {
|
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) {
|
public static boolean isNearShulkerBox(final Location location) {
|
||||||
@@ -174,7 +176,7 @@ public final class Utilities {
|
|||||||
if (MinecraftVersion.getCurrentVersion().isAtLeast(MinecraftVersion.COLOR_UPDATE)) {
|
if (MinecraftVersion.getCurrentVersion().isAtLeast(MinecraftVersion.COLOR_UPDATE)) {
|
||||||
return false;
|
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
|
* @return true if the player could be standing on slime
|
||||||
*/
|
*/
|
||||||
public static boolean couldBeOnSlime(final Location location) {
|
public static boolean couldBeOnSlime(final Location location) {
|
||||||
return isNearSlime(new Location(location.getWorld(), fixXAxis(location.getX()), location.getY() - 0.01D,
|
return isNearSlime(new Location(location.getWorld(), location.getX(), location.getY() - 0.01D,
|
||||||
location.getBlockZ()))
|
location.getZ()))
|
||||||
|| isNearSlime(new Location(location.getWorld(), fixXAxis(location.getX()), location.getY() - 0.51D,
|
|| isNearSlime(new Location(location.getWorld(), location.getX(), location.getY() - 0.51D,
|
||||||
location.getBlockZ()));
|
location.getZ()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isNearSlime(final Location location) {
|
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
|
* @return true if the player could be standing on soil
|
||||||
*/
|
*/
|
||||||
public static boolean couldBeOnSoil(final Location location) {
|
public static boolean couldBeOnSoil(final Location location) {
|
||||||
return isNearSoil(new Location(location.getWorld(), fixXAxis(location.getX()), location.getY() - 0.01D,
|
return isNearSoil(new Location(location.getWorld(), location.getX(), location.getY() - 0.01D,
|
||||||
location.getBlockZ()))
|
location.getZ()))
|
||||||
|| isNearSoil(new Location(location.getWorld(), fixXAxis(location.getX()), location.getY() - 0.51D,
|
|| isNearSoil(new Location(location.getWorld(), location.getX(), location.getY() - 0.51D,
|
||||||
location.getBlockZ()));
|
location.getZ()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isNearSoil(final Location location) {
|
public static boolean isNearSoil(final Location location) {
|
||||||
|
|||||||
Reference in new issue
Block a user