Blockdata Problems [duplicate]

Blockdata Problems [duplicate] - Man in Black and White Plaid Dress Shirt Holding Black Smartphone

I've been working on something that uses lots of blockdata commands. It was all going well until I needed to put a enchanted book that works with anvils into the command so that I could get it out of the chest above and be able to use it to enchant something with efficiency v but I don't know how to make it work. Here is the command so far:

/blockdata ~ ~3 ~ {Items:[{id:403,StoredEnchantments:,Count:1,Slot:0}]}

When I put in the correct stuff for StoredEnchantments it doesn't appear. What I'm trying to do is make this command into a blockdata command where the enchanted book will appear in the chest instead of my inventory:

/give @p minecraft:enchanted_book 1 0 {StoredEnchantments:[{id:32,lvl:5}]}


Best Answer

The problem here is that the StoredEnchantments tag is not directly in the item's root tag, it is in the tag tag. Try this:

/blockdata ~ ~3 ~ {Items:[{id:403,Count:1,Slot:0,tag:{StoredEnchantments:[{id:32,lvl:5}]}}]}



Pictures about "Blockdata Problems [duplicate]"

Blockdata Problems [duplicate] - Man in Black and White Plaid Dress Shirt Holding Black Smartphone
Blockdata Problems [duplicate] - Woman in Blue Shirt Talking to a Young Man in White Shirt
Blockdata Problems [duplicate] - Woman in Blue and White Crew Neck Shirt





Get A Unique List of Duplicate Items -One Step




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

Images: Mikhail Nilov, Mikhail Nilov, Kindel Media, Kindel Media