From 999b063762e209ad8fcb61af2bab3238e18e3077 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Tue, 12 May 2020 10:58:43 +0100 Subject: [PATCH] Don't write reserved to schematics --- .../worldedit/extent/clipboard/io/FastSchematicWriter.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/FastSchematicWriter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/FastSchematicWriter.java index b57a50448..3bbb2c02d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/FastSchematicWriter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/FastSchematicWriter.java @@ -21,7 +21,6 @@ package com.sk89q.worldedit.extent.clipboard.io; import com.boydti.fawe.jnbt.streamer.IntValueReader; import com.boydti.fawe.object.FaweOutputStream; -import com.boydti.fawe.object.clipboard.LinearClipboard; import com.boydti.fawe.util.IOUtil; import com.google.common.collect.Maps; import com.sk89q.jnbt.CompoundTag; @@ -45,7 +44,6 @@ import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.biome.BiomeTypes; import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.world.block.BlockTypesCache; import net.jpountz.lz4.LZ4BlockInputStream; import net.jpountz.lz4.LZ4BlockOutputStream; @@ -181,6 +179,9 @@ public class FastSchematicWriter implements ClipboardWriter { } int ordinal = block.getOrdinal(); + if (ordinal == 0) { + ordinal = 1; + } char value = palette[ordinal]; if (value == Character.MAX_VALUE) { int size = paletteMax++; @@ -338,4 +339,4 @@ public class FastSchematicWriter implements ClipboardWriter { public void close() throws IOException { outputStream.close(); } -} \ No newline at end of file +}