Parsing failed error when spawning a chest preloaded with items

Parsing failed error when spawning a chest preloaded with items - Woman Sitting Beside Ice Cream

When I use this command to spawn a chest with items already in it:

/setblock 219 230 84 chest 0 replace {Items:[{id:261,Slot:0,Count:1, tag:{ench[{id:49,lvl:100,{id:51,lvl:1}}]}},{id:262,Slot:1,Count:1},{id:310,Slot:2,Count:1},{id:311,Slot:3,Count:1},{id:312,Slot:4,Count:1},{id:313,Slot:5,Count:1}],display:{Name:"Your stuff",Lore:["have fun","and fun"]}}

I get this error:

[19:37:36] Data tag parsing failed: Unable to locate name/value separator for string: ench[{id:49,lvl:100,{id:51,lvl:1}}]



Best Answer

Data tags have the form name : value. The name/value separator is :. You need to put : between the name (ench) and the value ([{id:49,lvl:100,{id:51,lvl:1}}]) of the tag.

There is also a typo in the value itself. Each enchantment has to be given as a compound tag, enclosed in curly brackets. You need to close the first enchantment by putting } after lvl:100, then remove the duplicate one at the end:

ench:[{id:49,lvl:100},{id:51,lvl:1}]




Pictures about "Parsing failed error when spawning a chest preloaded with items"

Parsing failed error when spawning a chest preloaded with items - Free stock photo of abstract, ancient, antique
Parsing failed error when spawning a chest preloaded with items - Free stock photo of arts and crafts, bamboo, blur
Parsing failed error when spawning a chest preloaded with items - Free stock photo of ancient, architecture, art





Fix Configuration Parser Error - Error Parsing - Parser Returned Error 0xC00CE556




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Gratisography, Yan Krukov, Yan Krukov, Yan Krukov