Don't write biome data to schematics if it's not present

This commit is contained in:
dordsor21 2021-11-10 19:51:14 +00:00
parent 88775334b7
commit 87a2e81ec3
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -581,6 +581,10 @@ public abstract class SchematicHandler {
schematic.put("BlockData", new ByteArrayTag(buffer.toByteArray())); schematic.put("BlockData", new ByteArrayTag(buffer.toByteArray()));
schematic.put("BlockEntities", new ListTag(CompoundTag.class, tileEntities)); schematic.put("BlockEntities", new ListTag(CompoundTag.class, tileEntities));
if (biomeBuffer.size() == 0 || biomePalette.size() == 0) {
return;
}
schematic.put("BiomePaletteMax", new IntTag(biomePalette.size())); schematic.put("BiomePaletteMax", new IntTag(biomePalette.size()));
Map<String, Tag> biomePaletteTag = new HashMap<>(); Map<String, Tag> biomePaletteTag = new HashMap<>();