From dd0bec89135fede4966d53180256bc346d677b54 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Mon, 13 May 2019 00:37:18 +1000 Subject: [PATCH] Fix //none removing arbitrary nbt --- .../src/main/java/com/boydti/fawe/util/BrushCache.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/util/BrushCache.java b/worldedit-core/src/main/java/com/boydti/fawe/util/BrushCache.java index 4adbcdc35..7c885af07 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/util/BrushCache.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/util/BrushCache.java @@ -77,8 +77,11 @@ public final class BrushCache { Map map; if (nbt == null) { if (tool == null) { - item.setNbtData(null); - return tool; + Map raw = nbt.getRaw(); + if (raw.remove("weBrushJson") != null && raw.isEmpty()) { + item.setNbtData(null); + } + return null; } nbt = new CompoundTag(map = new HashMap<>()); } else {