1

I want to summon a chest with one custom item inside that has a custom name and lore tag. I have not found any posts about this specific situation.

The item I want to have inside the chest is a tripwire hook named "Small Key" with the lore tag "This key may only be used at your current location." [As a give command]:

/give @a Minecraft:tripwire_hook{display:{Name:"\"Small Key\"",Lore:["\"This key may only be used at your current location.\""]}} 1

I have already tried using mcstacker.net but there is no available command for chests, only minecarts with chests. I tried to change chest_minecart to only chest, but this does not work in-game. The command given from mcstacker.net is:

/summon chest_minecart ~ ~ ~ {Motion:[10.0,49.0,89.0],Items:[{Slot:1b,id:"minecraft:tripwire_hook",Count:1b,tag:{display:{Name:'{"text":"Small Key"}',Lore:['{"text":"This key may only be used at your current location."}']}}}]}

I have also looked in other threads and forums for answers but I have not found anything that helps. Examples:

Here on there is also another question asked, why does the following command work:

/summon chest_minecart ~ ~ ~ {Motion:[10.0,49.0,89.0],Items:[{Slot:1b,id:"minecraft:tripwire_hook",Count:1b,tag:{display:{Name:'{"text":"Small Key"}',Lore:['{"text":"This key may only be used at your current location."}']}}}]}

while this command does not?

/summon chest ~ ~ ~ {Motion:[10.0,49.0,89.0],Items:[{Slot:1b,id:"minecraft:tripwire_hook",Count:1b,tag:{display:{Name:'{"text":"Small Key"}',Lore:['{"text":"This key may only be used at your current location."}']}}}]}

Note: chest_minecart can be replaced with all other blocks, even entities. But not chest.

2

This is the correct command:

/setblock ~ ~ ~1 chest{Items:[{Slot:1b,id:"minecraft:tripwire_hook",Count:1b,tag:{display:{Name:'{"text":"Small Key"}',Lore:['{"text":"This key may only be used at your current location."}']}}}]} replace

The reason as to why chest_minecart can't be replaced with chest is that /summon is specific for entities and /setblock for blocks.

3
  • @ExpertCoder14 Thanks! – Leten Dec 23 '20 at 18:48
  • Idly wondering, what got you into thinking that a chest was an entity? It doesn't move like a chest minecart, and has a block outline when you hover over it. MCStacker also showed you that a chest was not an entity because its summon generator does not have chest in the list. – ExpertCoder14 Dec 24 '20 at 18:04
  • @ExpertCoder14 Well, to be honest, I feel rather stupid after finding out what the issue was. It was a while ago I was playing around with commands and commandblocks. If we go back to the time when I knew what I was doing, the block/entity ID:s where still integers and not strings, so it was a while ago. – Leten Dec 26 '20 at 10:44

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.