From 20f680d14ea25c1f212f6882ea4fe98da0bd7340 Mon Sep 17 00:00:00 2001 From: mworzala Date: Mon, 11 Mar 2024 17:40:51 -0400 Subject: [PATCH] fix: write as v2 with 1.20.4 data version --- src/main/java/net/hollowcube/schem/SchematicWriter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/hollowcube/schem/SchematicWriter.java b/src/main/java/net/hollowcube/schem/SchematicWriter.java index 41c0795..de78ad3 100644 --- a/src/main/java/net/hollowcube/schem/SchematicWriter.java +++ b/src/main/java/net/hollowcube/schem/SchematicWriter.java @@ -14,8 +14,11 @@ public class SchematicWriter { - public static byte@NotNull [] write(@NotNull Schematic schematic) { + public static byte @NotNull [] write(@NotNull Schematic schematic) { MutableNBTCompound schematicNBT = new MutableNBTCompound(); + schematicNBT.setInt("Version", 2); + schematicNBT.setInt("DataVersion", 3700); + Point size = schematic.size(); schematicNBT.setShort("Width", (short) size.x()); schematicNBT.setShort("Height", (short) size.y());