Minecraft 1.10: Add attribute to item without nerfing other attributes?

Minecraft 1.10: Add attribute to item without nerfing other attributes? - Minimalistic workplace with laptop and empty frame with office attributes during coffee break

Trying to give myself a diamond sword that gives it's wielder 2 additional hearts. But adding the attribute also seems to remove the sword's damage, making it do just 1 damage per hit. Does anyone know how to avoid this?

give @p diamond_sword 1 0 {AttributeModifiers:[{Slot:"mainhand",AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:4,Operation:0,UUIDLeast:894654,UUIDMost:2872}]}

Sure I could just add +7 attack damage as an attribute, but that just seems unnecessary and doesn't look good in the item's description.



Best Answer

I have no idea if this will still be helpful to you, since this is an older post, but if you want to specify specific modifier values that will appear, you can put any attribute modifiers you like in and use the HideFlags tag to make them not appear.

http://minecraft.gamepedia.com/Tutorials/Command_NBT_tags

If you actually want specific values to appear, you can use the "Lore" option that goes into the "display" NBT tag, which allows you to leave custom text on an item, and then just type in what you wish to appear manually.




Pictures about "Minecraft 1.10: Add attribute to item without nerfing other attributes?"

Minecraft 1.10: Add attribute to item without nerfing other attributes? - Happy couple in casual clothes moving personal items in carton boxes from car trunk to new house
Minecraft 1.10: Add attribute to item without nerfing other attributes? - Young ethnic female buyers interacting while laughing near shelves with kitchen items and looking at each other in store
Minecraft 1.10: Add attribute to item without nerfing other attributes? - Spooky skeleton mask placed near orange bucket outdoors



How do you add attributes to items in Minecraft?

Attributes/modifiers can be added to items or mobs without the use of third-party NBT editing software by adding data tags to the give and summon commands. The UUIDs for these modifiers should be randomly chosen, to prevent accidentally using the same UUID as another modifier.

How do you give mobs attributes in Minecraft?

You can use the /attribute command to get the total value of an attribute, get the base value of an attribute, set the base value of an attribute, or work with attribute modifiers for a targeted entity in Minecraft.



Tip: 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: Tatiana Syrikova, Ketut Subiyanto, Sam Lion, Charles Parker