From 2c76c23bf22e30799cc9d26e16dcbf47358be142 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 11 Jul 2019 08:11:37 +1000 Subject: [PATCH 1/3] don't use nms world.n --- .../java/com/boydti/fawe/bukkit/v1_13/BukkitChunk_1_13.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v1_13/BukkitChunk_1_13.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v1_13/BukkitChunk_1_13.java index a023fc927..7906618db 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v1_13/BukkitChunk_1_13.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v1_13/BukkitChunk_1_13.java @@ -570,7 +570,10 @@ public class BukkitChunk_1_13 extends IntFaweChunk { for (Map.Entry entry : toRemove.entrySet()) { BlockPosition bp = entry.getKey(); TileEntity tile = entry.getValue(); - nmsWorld.n(bp); + tile.y(); +// nmsWorld.c.remove(bp); +// nmsWorld.tileEntityList.remove(bp); +// nmsWorld.tileEntityListTick.remove(bp); tiles.remove(bp); tile.z(); tile.invalidateBlockCache(); From b3e11d2094c028871c4723b4299cf1e5cb7e4d04 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 17 Jul 2019 05:16:08 +1000 Subject: [PATCH 2/3] patch for missing tile position data --- .../clipboard/io/SpongeSchematicReader.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java index c6649a0c9..4cc72a692 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java @@ -183,9 +183,20 @@ public class SpongeSchematicReader extends NBTSchematicReader { setupClipboard(0, uuid); } int[] pos = value.getIntArray("Pos"); - int x = pos[0]; - int y = pos[1]; - int z = pos[2]; + int x,y,z; + if (pos == null) { + System.out.println("Invalid tile " + value); + if (!value.containsKey("x") || !value.containsKey("y") || !value.containsKey("z")) { + return; + } + x = value.getInt("x"); + y = value.getInt("y"); + z = value.getInt("z"); + } else { + x = pos[0]; + y = pos[1]; + z = pos[2]; + } fc.setTile(x, y, z, value); } }); From 75f059fdc5083ccf3963a4ecd39cbf8ea90995ff Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 17 Jul 2019 05:28:55 +1000 Subject: [PATCH 3/3] check length, not null --- .../worldedit/extent/clipboard/io/SpongeSchematicReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java index 4cc72a692..098f70081 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java @@ -184,7 +184,7 @@ public class SpongeSchematicReader extends NBTSchematicReader { } int[] pos = value.getIntArray("Pos"); int x,y,z; - if (pos == null) { + if (pos.length != 3) { System.out.println("Invalid tile " + value); if (!value.containsKey("x") || !value.containsKey("y") || !value.containsKey("z")) { return;