From 87a2e81ec39ccd2d0736f1a911e1ab79bebefed7 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 10 Nov 2021 19:51:14 +0000 Subject: [PATCH] Don't write biome data to schematics if it's not present --- .../main/java/com/plotsquared/core/util/SchematicHandler.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java b/Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java index ee8468267..b0e65943f 100644 --- a/Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java +++ b/Core/src/main/java/com/plotsquared/core/util/SchematicHandler.java @@ -581,6 +581,10 @@ public abstract class SchematicHandler { schematic.put("BlockData", new ByteArrayTag(buffer.toByteArray())); schematic.put("BlockEntities", new ListTag(CompoundTag.class, tileEntities)); + if (biomeBuffer.size() == 0 || biomePalette.size() == 0) { + return; + } + schematic.put("BiomePaletteMax", new IntTag(biomePalette.size())); Map biomePaletteTag = new HashMap<>();