IntegratedDynamics icon indicating copy to clipboard operation
IntegratedDynamics copied to clipboard

Operator to override/remove NBT from an item

Open Pultex opened this issue 6 years ago • 3 comments

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.

Pultex avatar Dec 28 '19 21:12 Pultex

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.

rubensworks avatar Dec 29 '19 13:12 rubensworks

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.

GreyMario avatar Dec 29 '19 23:12 GreyMario

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

TacocaTYT avatar May 27 '21 19:05 TacocaTYT