nbt values retain their string representation forever.

This commit is contained in:
gnembon committed 2020-07-15 03:43:06 -03:00
1 parent e8d6e16745
commit 52e54c0a47
1 file changed
+12 -1
@@ -436,6 +436,7 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
return false;
}
}
if (modifiedTag) dirty();
return modifiedTag;
}
@@ -582,13 +583,23 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
}
}
private void dirty()
{
nbtString = null;
}
@Override
public boolean delete(Value where)
{
NbtPathArgumentType.NbtPath path = cachePath(where.getString());
ensureOwnership();
int removed = path.remove(getTag());
return removed > 0;
if (removed > 0)
{
dirty();
return true;
}
return false;
}
public static class InventoryLocator