Check against GameMode.CREATIVE in general.

This commit is contained in:
asofold 2012-10-01 03:01:58 +02:00
parent 13c4d654db
commit 5bceb353b7
4 changed files with 4 additions and 4 deletions

View File

@ -52,7 +52,7 @@ public class Reach extends Check {
boolean cancel = false;
final double distanceLimit = player.getGameMode() == GameMode.SURVIVAL ? SURVIVAL_DISTANCE : CREATIVE_DISTANCE;
final double distanceLimit = player.getGameMode() == GameMode.CREATIVE ? CREATIVE_DISTANCE : SURVIVAL_DISTANCE;
// Distance is calculated from eye location to center of targeted block. If the player is further away from his
// target than allowed, the difference will be assigned to "distance".

View File

@ -53,7 +53,7 @@ public class Reach extends Check {
boolean cancel = false;
final double distanceLimit = player.getGameMode() == GameMode.SURVIVAL ? SURVIVAL_DISTANCE : CREATIVE_DISTANCE;
final double distanceLimit = player.getGameMode() == GameMode.CREATIVE ? CREATIVE_DISTANCE : SURVIVAL_DISTANCE;
// Distance is calculated from eye location to center of targeted block. If the player is further away from his
// target than allowed, the difference will be assigned to "distance".

View File

@ -54,7 +54,7 @@ public class Reach extends Check {
boolean cancel = false;
final double distanceLimit = player.getGameMode() == GameMode.SURVIVAL ? SURVIVAL_DISTANCE : CREATIVE_DISTANCE;
final double distanceLimit = player.getGameMode() == GameMode.CREATIVE ? CREATIVE_DISTANCE : SURVIVAL_DISTANCE;
// Distance is calculated from eye location to center of targeted block. If the player is further away from his
// target than allowed, the difference will be assigned to "distance".

View File

@ -56,7 +56,7 @@ public class Reach extends Check {
boolean cancel = false;
final double distanceLimit = player.getGameMode() == GameMode.SURVIVAL ? SURVIVAL_DISTANCE : CREATIVE_DISTANCE;
final double distanceLimit = player.getGameMode() == GameMode.CREATIVE ? CREATIVE_DISTANCE : SURVIVAL_DISTANCE;
// Reference locations to check distance for.
// TODO: improve reference location: depending on height difference choose min(foot/hitbox, attacker)