I copied a command from McStacker, put it into a command block and it never works (i am on the correct version and i am op).

why doesnt this work for me? i have watched tutorials on youtube and made sure to follow it through (link to the video:


Here is the command:

/give @p carrot_on_a_stick{display:{Name:'{"text":"Lee Enfield","color":"green","bold":true,"italic":true}'},HideFlags:5,Unbreakable:1b,CustomModelData:123456,Lee Enfield:1b,Enchantments:[{id:"minecraft:sharpness",lvl:10s},{id:"minecraft:knockback",lvl:1s}]} 1
  • the command exactly is"/give @p carrot_on_a_stick{display:{Name:'{"text":"Lee Enfield","color":"green","bold":true,"italic":true}'},HideFlags:5,Unbreakable:1b,CustomModelData:123456,Lee Enfield:1b,Enchantments:[{id:"minecraft:sharpness",lvl:10s},{id:"minecraft:knockback",lvl:1s}]} 1" i am playing on java and it basically said that the whole command was wrong, this happens with most of the commands i put in. – Matthew david alexander Oct 25 at 0:29
  • i am playing on java – Matthew david alexander Oct 25 at 0:31
  • i am playing on 1.16.3 – Matthew david alexander Oct 25 at 0:35
  • yes its a custom tag, is that the only problem? – Matthew david alexander Oct 25 at 0:37
  • i just tested it, and it worked thanks you are a legend – Matthew david alexander Oct 25 at 0:41

Take a closer look at this section:

...CustomModelData:123456,Lee Enfield:1b,Enchantments:...

Lee Enfield, I presume, is a custom tag you're using to detect that item. Tag names cannot contain spaces in commands, while the files technically allow for it, Minecraft won't allow it. So you should change your tag name to something without spaces: LeeEnfield

That seems to be all, the command is marked correct when the space is removed.

| improve this answer | |

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.