Minecraft – Removing attribute modifiers on dropped items

minecraft-commandsminecraft-java-edition

Just a quick question: what path would I use to remove all attribute modifiers from a dropped item?

ive used with no avail:

Item.tag.AttributeModifiers

Item.AttributeModifiers

AttributeModifiers

ive also tried the [] at the end as well

Best Answer

The correct path is:

Item.tag.AttributeModifiers[]

to remove all attribute modifiers from a dropped item. If you've already tried this, then maybe your setup is wrong.

The command you'll need is:

/data remove entity @e[type=item,limit=1,sort=nearest] Item.tag.AttributeModifiers[]