How to add attributes to existing items
//ads -- adsterra.com -- native banner
?>
The /give and /replaceitem commands are fine if I want to create a new item with a custom attribute, but is there a command to add an attribute to an existing item?
The closest I've gotten to this is adding attributes to an entity representing a dropped item, but the attributes do not carry over to the item once picked up:
/entitydata @e[type=Item,r=1] {AttributeModifiers:[{...}]}
Thanks in advance!
Best Answer
Here is the updated command syntax for 1.13+:
/data merge entity @e[type=item,distance=..5,limit=1] {Item:{tag:{AttributeModifiers:[{<attribute stuff>}]}}}
Pictures about "How to add attributes to existing items"



How do you add attributes to an item?
How do you add a new attribute to an existing item type in SAP Hybris Commerce?How do you add a new attribute to an existing item type in SAP hybris Commerce?
Use setattr() to add attributes to a class at runtimeTip: Add Attributes to Items in Minecraft
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: ANTONI SHKRABA, ANTONI SHKRABA, Alexander Zvir, Sharon McCutcheon
