I want have the item in the chest (the dye) to have a custom name, I have tried very hard to do so.

Here is what I have so far (it works but I need the item to have a name as said before):

/give @p chest 1 0 {BlockEntityTag:{Items:[{Slot:0,id:dye,Damage:2,Count:1}]}}

Also I need the answer in 1.12

Here are things I tried but failed:

/give @p chest 1 0 {BlockEntityTag:{Items:[{Slot:0,id:dye,Damage:2,Count:1,disp‌​lay:{Name:"Name of item"}}]}}


/give @p chest 1 0 {BlockEntityTag:{Items:[Slot:0,id:dye,Damage:2,Count:1,tag:{display:{Name:"Name of item"}}]}}
  • What's not happening? What does the error (if any) say? – Ben Sep 26 '17 at 2:14
  • Well I tried add this to the command but it wouldn't work /give @p chest 1 0 {BlockEntityTag:{Items:[{Slot:0,id:dye,Damage:2,Count:1,display:{Name="Name of item"}}]}} – Smart_Snake Sep 26 '17 at 2:19
  • Again, is this giving you an error? – Ben Sep 26 '17 at 2:21
  • No! The command above does work – Smart_Snake Sep 26 '17 at 2:26
  • 1
    Understandable Have a nice day – Smart_Snake Sep 26 '17 at 2:49

Anything that you would put within the data tag of a /give command…

/give @p dye 1 2 {display:{Name:"Bob"}}

…is stored within the "tag" of an item, like so:

/give @p chest 1 0 {BlockEntityTag:{Items:[{Slot:0,id:dye,Damage:2,Count:1, tag:{display:{Name:"Bob"}} }]}}
| improve this answer | |
  • hmm this does not work I put it in minecraft and it had an error. Did it work for you? – Smart_Snake Sep 26 '17 at 2:24
  • 2
    /give @p chest 1 0 {BlockEntityTag:{Items:[{Slot:0,id:dye,Damage:2,Count:1,tag:{display:{Name:"Bob"}}}]}} Is correct, SB forgot that Items is a list of compounds. – Pepijn Sep 26 '17 at 2:56
  • thanks Pepijn I just wish you submitted this as a answer so I could check it – Smart_Snake Sep 26 '17 at 3:02
  • I edited it in. To be able save, I had to change at least 6 characters, so I changed the quote formatting to a code formatting, but that didn't work, because there was an empty line missing, so now the formatting is wrong, but I can't edit it until my previous edit was reviewed. Great. The mobile page really needs a preview function. – Fabian Röling Sep 26 '17 at 7:25
  • Oh sorry about leaving out the list part. I got so focused on explaining where the tag comes from I forgot to double check my command – SB32 Sep 27 '17 at 4:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.