mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Use long-reach distance for upward directions
This commit is contained in:
1 parent
4d6a3aada3
commit
73b5ee8cff
1 file changed
+4
-1
@@ -230,7 +230,10 @@ public class Backend {
|
||||
return new CheckResult(Result.PASSED);
|
||||
} else {
|
||||
String string = player.getName()+" reached too far for a block";
|
||||
double distance = player.getGameMode() == GameMode.CREATIVE ? magic.BLOCK_MAX_DISTANCE_CREATIVE : magic.BLOCK_MAX_DISTANCE;
|
||||
double distance =
|
||||
player.getGameMode() == GameMode.CREATIVE ? magic.BLOCK_MAX_DISTANCE_CREATIVE
|
||||
: player.getLocation().getDirection().getY() > 0.9 ? magic.BLOCK_MAX_DISTANCE_CREATIVE
|
||||
: magic.BLOCK_MAX_DISTANCE;
|
||||
double i = x >= distance ? x : y > distance ? y : z > distance ? z : -1;
|
||||
if(i != -1) {
|
||||
return new CheckResult(Result.FAILED, string+" (distance="+i+", max="+magic.BLOCK_MAX_DISTANCE+")");
|
||||
|
||||
Reference in new issue
Block a user