Skip to content

Commit

Permalink
this method doesnt make sense
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Jan 2, 2024
1 parent d1ee1d1 commit de94165
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,6 @@ public static double getXZDistance(Location from, Location to) {
return FastMath.hypot(toX - fromX, toZ - fromZ);
}

public static double getXYDistance(Location from, Location to) {
double toX = to.x();
double fromX = from.x();

final World.Environment toEnv = to.getWorld().getEnvironment();
final World.Environment fromEnv = from.getWorld().getEnvironment();
if (!toEnv.equals(fromEnv)) {
if (fromEnv.equals(World.Environment.NETHER))
fromX *= 8;
if (toEnv.equals(World.Environment.NETHER))
toX *= 8;
}

return FastMath.hypot(toX - fromX, to.y() - from.y());
}

public static boolean isNetherCeiling(Location location) {
return location.getWorld().getEnvironment().equals(World.Environment.NETHER)
&& location.y() > AnarchyExploitFixes.getConfiguration().nether_ceiling_max_y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,6 @@ public static double getXZDistance(Location from, Location to) {
return FastMath.hypot(toX - fromX, toZ - fromZ);
}

public static double getXYDistance(Location from, Location to) {
double toX = to.getX();
double fromX = from.getX();

final World.Environment toEnv = to.getWorld().getEnvironment();
final World.Environment fromEnv = from.getWorld().getEnvironment();
if (!toEnv.equals(fromEnv)) {
if (fromEnv.equals(World.Environment.NETHER))
fromX *= 8;
if (toEnv.equals(World.Environment.NETHER))
toX *= 8;
}

return FastMath.hypot(toX - fromX, to.getY() - from.getY());
}

public static boolean isNetherCeiling(Location location) {
return location.getWorld().getEnvironment().equals(World.Environment.NETHER)
&& location.getY() > AnarchyExploitFixes.getConfiguration().nether_ceiling_max_y;
Expand Down

0 comments on commit de94165

Please sign in to comment.