1

I need help adding an attribute modifier to a Minecraft item using a /give command

GrimWither 12/30/20 11:18 pm
1k
1/1/2021 1:18 am
I'm trying to make a sword that gives you more speed while holding it but how do I do the by using a single /give command that why I can name the item and give it a custom data tag.
Posted by
GrimWither
Level 38 : Artisan Engineer
23

  Have something to say?

JoinSign in

2

HoboMaggot
12/31/2020 7:08 am
Level 55 : Grandmaster Blob
/give @p iron_sword{display:{Name:'{"text":"a sword"}'},custom_tag:1,AttributeModifiers:[{AttributeName:"generic.movement_speed",Name:"generic.movement_speed",Amount:1,Operation:0,UUID:[I;350993406,221596246,-1429390574,-1981561634],Slot:"mainhand"}]} 1

For simple stuff like this, you can use mcstacker to generate your give commands instead
1
GrimWither
01/01/2021 1:18 am
Level 38 : Artisan Engineer
Yeah that was the problem MCStacker was not working for me. but luckily I found another generator that works but thanks for the help, also happy new year!
1

Welcome