Integrated Dynamics

Integrated Dynamics

63M Downloads

Operator to override/remove NBT from an item

Pultex opened this issue ยท 3 comments

commented

Issue type:Question

Can you remove all NBT data from a entity list or item list but keep all items still in a list ?


Question:

I wanted to remove the NBT data from all items in an entity reader list variable.
I see that I can convert the whole list into a item list with MAP and entity -> item.
I was hoping to be able to use some thing like MAP NBT -> negation( ) -> item or something.

I don't think you an pull all items from a active list strip NBT then add them back to a new list
with no NBT, unless I don't see what would allow you to do this.

just a simple answer would do no need to make a list of steps.

commented

Try mapping the list to the unique name, then back to an item using operators String Unique Name and then Item Item By Name. This doesn't provide a method to override NBT, and will remove stack sizes, but will retain most of what identifies an item as an item. Naturally, items which require NBT or capabilities to be uniquely identified will cease to be uniquely identified properly.

commented

This is not possible yet AFAIK.
Ideally, we should have a withnbt operator (similar to withsize).

I'll convert this issue into a feature request.

commented

perhaps add i as a config option for pack devs including mods that need NBT such as resource hogs from sf4