From 629be505e2fd97560f3cb32910724d5f87c8c7c3 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Tue, 16 Apr 2019 13:29:59 +1000 Subject: [PATCH] Fix ghost blocks --- .../java/com/boydti/fawe/bukkit/v1_13/BukkitQueue_1_13.java | 6 ++++++ .../com/boydti/fawe/object/changeset/FaweChangeSet.java | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v1_13/BukkitQueue_1_13.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v1_13/BukkitQueue_1_13.java index 3e5fb5cb1..884fce93e 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v1_13/BukkitQueue_1_13.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v1_13/BukkitQueue_1_13.java @@ -684,6 +684,12 @@ public class BukkitQueue_1_13 extends BukkitQueue_0() { @Override public Object get() { diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/changeset/FaweChangeSet.java b/worldedit-core/src/main/java/com/boydti/fawe/object/changeset/FaweChangeSet.java index 3f5e2747a..8600e4bba 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/changeset/FaweChangeSet.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/changeset/FaweChangeSet.java @@ -15,6 +15,7 @@ import com.boydti.fawe.util.TaskManager; import com.sk89q.jnbt.CompoundTag; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.world.block.BaseBlock; +import com.sk89q.worldedit.world.block.BlockID; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.extent.inventory.BlockBag; import com.sk89q.worldedit.history.change.BlockChange; @@ -281,7 +282,6 @@ public abstract class FaweChangeSet implements ChangeSet { index++; } } - // TODO } // Block changes for (int layer = 0; layer < layers; layer++) { @@ -305,7 +305,7 @@ public abstract class FaweChangeSet implements ChangeSet { case 1: combinedIdCurrent = 0; default: - int combinedIdPrevious = previousLayer != null ? previousLayer[index] : 0; + int combinedIdPrevious = previousLayer != null ? previousLayer[index] : BlockID.AIR; if (combinedIdCurrent != combinedIdPrevious) { add(xx, yy, zz, combinedIdPrevious, combinedIdCurrent); }