Minecraft – Blockdata clearing chest instead of putting item in chest

minecraft-commandsminecraft-java-edition

I am trying to put a wet sponge in a chest with the following command:

/blockdata -190 56 -401 {Items:[:{Count:1,Slot:4,id:sponge:1}]} 

The sponge:1 should give me a wet sponge, but instead it just clears the chest.

How can I put a wet sponge in a chest?

Best Answer

In NBT data (nor anywhere else in Minecraft) you do not use id:metadata to get a block/item with a certain damage value.

The correct NBT item structure can be found here:

http://minecraft.gamepedia.com/Player.dat_Format#Item_structure

So, for your command, you should do:

blockdata -190 56 -401 {Items:[{Count:1,Slot:4,Damage:1,id:sponge}]}