From 7905ee0e86e242a2c698450a0ec98bf0a5a15b97 Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Mon, 10 Jun 2024 21:17:27 +0200 Subject: [PATCH] fix/chore: write pos as doubles --- .../core/extent/clipboard/io/FastSchematicWriterV3.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/FastSchematicWriterV3.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/FastSchematicWriterV3.java index 2addc67bd..689a6afaa 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/FastSchematicWriterV3.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/FastSchematicWriterV3.java @@ -184,11 +184,11 @@ public class FastSchematicWriterV3 implements ClipboardWriter { out.writeNamedTag("Id", state.getType().id()); out.writeNamedTagName("Pos", NBTConstants.TYPE_LIST); - out.write(NBTConstants.TYPE_FLOAT); + out.write(NBTConstants.TYPE_DOUBLE); out.writeInt(3); - out.writeFloat((float) entity.getLocation().x() - clipboard.getMinimumPoint().x()); - out.writeFloat((float) entity.getLocation().y() - clipboard.getMinimumPoint().y()); - out.writeFloat((float) entity.getLocation().z() - clipboard.getMinimumPoint().z()); + out.writeDouble(entity.getLocation().x() - clipboard.getMinimumPoint().x()); + out.writeDouble(entity.getLocation().y() - clipboard.getMinimumPoint().y()); + out.writeDouble(entity.getLocation().z() - clipboard.getMinimumPoint().z()); out.writeLazyCompoundTag("Data", data -> { CompoundTag nbt = state.getNbtData();