Fix persistent brushes

This commit is contained in:
Jesse Boyd
2018-08-24 07:18:14 +10:00
parent dbd31ea347
commit c3db5c0cf1
10 changed files with 34 additions and 15 deletions

View File

@ -38,7 +38,9 @@ public final class BrushCache {
BrushTool cached = brushCache.get(key);
if (cached != null) return cached;
StringTag json = (StringTag) item.getNbtData().getValue().get("weBrushJson");
CompoundTag nbt = item.getNbtData();
if (nbt == null) return null;
StringTag json = (StringTag) nbt.getValue().get("weBrushJson");
if (json != null) {
try {
if (RECURSION.get() != null) return null;