1

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

3
  • Which ones have you tried the [] on? – ExpertCoder14 Jul 31 '20 at 16:56
  • I'm still curious, why did it not work the first time? Did you not try the code in my solution before? – ExpertCoder14 Jul 31 '20 at 17:22
  • I think my selector was off. it was probably picking up a different item. – Ironotor Jul 31 '20 at 17:24
0

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[]
1
  • I added sort=nearest so that it would always pick up the nearest item. – ExpertCoder14 Jul 31 '20 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.