Everytime I try to use a command to do an enchanted item it never works and there's just a 0 next to the item. I tried to spawn a diamond sword with sharpness in a chest but instead in the chest there was a normal diamond sword with a 0 next to it. Is it possible to put an enchanted weapon/item in a chest?

  • (the syntax for enchanted items is the exact same whether done via /give or in a chest)
    – pppery
    Aug 24, 2018 at 3:12

1 Answer 1

/setblock ~1 ~ ~ chest 0 replace {Items:[{id:"diamond_sword",Count:1,tag:{ench:[{id:16,lvl:1}]},Slot:13}]}

Try that by using a command block /give @p command_block 1

That will summon a chest 1 block to the left of the command block filled with a sharpness 1 diamond sword :)

  • I need it in a chest, this just gives it directly to you. Jul 5, 2015 at 20:05
  • ah yes, sorry let me edit that a sec.
    – Skye
    Jul 5, 2015 at 20:06
  • also, I got this error when I did it: [21:06:02] '{ench:[{id:16,lvl:1}]}' is not a valid number Jul 5, 2015 at 20:06
  • what version of minecraft and are you using a command block?
    – Skye
    Jul 5, 2015 at 20:07
  • I have the latest version of minecraft and I'm playing multiplayer (if that makes a difference) Jul 5, 2015 at 20:08

Not the answer you're looking for? Browse other questions tagged .