TransWikia.com

Can i give a item with attributemodifiers, without removing the base ones?

Arqade Asked on August 3, 2021

I do:

give @p diamond_sword{AttributeModifiers:[{Slot:"mainhand", AttributeName:"generic.attack_speed", Name:"generic.attack_speed", Amount:-2.2, Operation:0, UUID:[I;11168,11168,-11168,-11168]}]}

but it does 1 damage, can it save the base ones(damage and attack speed), without adding more modifiers?
Or add a modifier with a new command

/data modify block -163 69 149 Items[].tag.AttributeModifiers[] merge value {Slot:"mainhand", AttributeName:"generic.attack_speed", Name:"generic.attack_speed",Amount:7,Operation:0,UUID:[I;11168,11168,-11168,-11168]}

but this removes the furst one.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP