Skip to content

Commit

Permalink
Removed log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Picono435 committed Dec 26, 2022
1 parent cc6e0cf commit af5d9dd
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ private static Pair<Integer, Integer> generateBounds(ServerLevel world, Player p
double minWorldBorderX = world.getWorldBorder().getMinX();
int maxDistanceX = (int) (Config.getMaxDistance() == 0 ? Math.abs(maxWorldBorderX) + 2 : player.getX() >= 0 ? Config.getMaxDistance() + Math.round(player.getX()) : Config.getMaxDistance() - Math.round(player.getX()));
int minDistanceX = (int) (player.getX() >= 0 ? Config.getMinDistance() + player.getX() : Config.getMinDistance() - player.getX());
System.out.println(maxDistanceX + " MXDISTANCE X");
int highX;
if(Math.abs(maxDistanceX) >= Math.abs(maxWorldBorderX)) {
highX = (int) maxWorldBorderX;
Expand All @@ -145,15 +144,13 @@ private static Pair<Integer, Integer> generateBounds(ServerLevel world, Player p
} else {
lowX = (int) minWorldBorderX;
}
System.out.println(highX + " " + lowX + " " + maxWorldBorderX + " " + minWorldBorderX + " X");
return new Pair<>(lowX, highX);
} else {
// Calculating bounds for coordinates Z
double maxWorldBorderZ = world.getWorldBorder().getMaxZ();
double minWorldBorderZ = world.getWorldBorder().getMinZ();
int maxDistanceZ = (int) (Config.getMaxDistance() == 0 ? Math.abs(maxWorldBorderZ) + 2 : player.getZ() >= 0 ? Config.getMaxDistance() + Math.round(player.getZ()) : Config.getMaxDistance() - Math.round(player.getZ()));
int minDistanceZ = (int) (player.getZ() >= 0 ? Config.getMinDistance() + player.getZ() : Config.getMinDistance() - player.getZ());
System.out.println(maxDistanceZ + " MXDISTANCE Z");
int highZ;
if(Math.abs(maxDistanceZ) >= Math.abs(maxWorldBorderZ)) {
highZ = (int) maxWorldBorderZ;
Expand All @@ -168,7 +165,6 @@ private static Pair<Integer, Integer> generateBounds(ServerLevel world, Player p
} else {
lowZ = (int) minWorldBorderZ;
}
System.out.println(highZ + " " + lowZ + " " + maxWorldBorderZ + " " + minWorldBorderZ + " Z");
return new Pair<>(lowZ, highZ);
}
}
Expand Down

0 comments on commit af5d9dd

Please sign in to comment.