Fix too low bound and log spam

This commit is contained in:
ZacSharp 2024-02-25 19:29:03 +01:00
parent 28ba97c3de
commit d86a34a527
No known key found for this signature in database
GPG Key ID: 9453647B005083A3
1 changed files with 6 additions and 3 deletions

View File

@ -41,6 +41,7 @@ public class MapArtSchematic extends MaskSchematic {
private static int[][] generateHeightMap(IStaticSchematic schematic) {
int[][] heightMap = new int[schematic.widthX()][schematic.lengthZ()];
int missingColumns = 0;
for (int x = 0; x < schematic.widthX(); x++) {
for (int z = 0; z < schematic.lengthZ(); z++) {
BlockState[] column = schematic.getColumn(x, z);
@ -48,12 +49,14 @@ public class MapArtSchematic extends MaskSchematic {
if (lowestBlockY.isPresent()) {
heightMap[x][z] = lowestBlockY.getAsInt();
} else {
System.out.println("Column " + x + "," + z + " has no blocks, but it's apparently map art? wtf");
System.out.println("Letting it be whatever");
heightMap[x][z] = 256;
missingColumns++;
heightMap[x][z] = Integer.MAX_VALUE;
}
}
}
if (missingColumns != 0) {
System.out.println(missingColumns + " columns had no block despite being in a map art, letting them be whatever");
}
return heightMap;
}