Update reach distances for creative mode

Partially addresses #208
This commit is contained in:
h31ix committed 2013-04-24 20:59:01 -04:00
1 parent ba93711174
commit 4d6a3aada3
2 files changed
+3 -2

No files matched your search

@@ -230,7 +230,8 @@ public class Backend {
return new CheckResult(Result.PASSED);
} else {
String string = player.getName()+" reached too far for a block";
double i = x >= magic.BLOCK_MAX_DISTANCE ? x : y > magic.BLOCK_MAX_DISTANCE ? y : z > magic.BLOCK_MAX_DISTANCE ? z : -1;
double distance = player.getGameMode() == GameMode.CREATIVE ? 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+")");
} else {
@@ -56,6 +56,6 @@ public class CheckResult {
public int getData() {
return data;
}
}
}