Fix //none removing arbitrary nbt

This commit is contained in:
Jesse Boyd 2019-05-13 00:37:18 +10:00
parent 317742e3f0
commit dd0bec8913
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -77,8 +77,11 @@ public final class BrushCache {
Map<String, Tag> map; Map<String, Tag> map;
if (nbt == null) { if (nbt == null) {
if (tool == null) { if (tool == null) {
item.setNbtData(null); Map<String, Object> raw = nbt.getRaw();
return tool; if (raw.remove("weBrushJson") != null && raw.isEmpty()) {
item.setNbtData(null);
}
return null;
} }
nbt = new CompoundTag(map = new HashMap<>()); nbt = new CompoundTag(map = new HashMap<>());
} else { } else {