Allow schematics with empty, but present, biome data

This commit is contained in:
dordsor21 2021-11-10 19:45:49 +00:00
parent 4272f96ade
commit f04e891e0c
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -312,7 +312,7 @@ public class FastSchematicReader extends NBTSchematicReader {
} }
} }
} }
if (biomesOut != null && biomesOut.getSize() != 0) { if (biomesOut != null && biomesOut.getSize() != 0 && biomePalette != null && biomePalette.length > 0) {
try (FaweInputStream fis = new FaweInputStream(new LZ4BlockInputStream(new FastByteArraysInputStream(biomesOut.toByteArrays())))) { try (FaweInputStream fis = new FaweInputStream(new LZ4BlockInputStream(new FastByteArraysInputStream(biomesOut.toByteArrays())))) {
for (int z = 0; z < length; z++) { for (int z = 0; z < length; z++) {
for (int x = 0; x < width; x++) { for (int x = 0; x < width; x++) {