I have an alarming and one annoying Minecraft 1.8.8 command that is to summon a item in a chest with another command of [CanPlaceOn]. This "[CanPlaceOn]" command is a command that allow certain things (blocks) to be placed on certain blocks! So when I am in adventure mode I can place the block that has the NBT tag of CanPlaceOn on a certain block. It would be helpful if someone could please provide the command for summoning a button in a chest that has the NBT CanPlaceOn tag.



/blockdata x y z {Items:[0:{id:minecraft:wooden_button,tag:{CanPlaceOn:["minecraft:stonebrick"]},Count:1}]}

Which can add to an already filled chest. Replace x y z with the coordinates.

The /blockdata command changes, well, the data of a block (go figure!) Basically, I change the data of a chest to include a wooden button with the tag CanPlaceOn. Pretty simple, really.

  • Thank you that is correct command because if you reset 2 or more times the chest just breaks
    – Cole
    Apr 24 '16 at 19:35
  • 1
    @Cole Glad I helped! Please consider clicking the green check next to my answer. That shows that I solved your problem, and future visitors can easy find out that this is in fact the correct solution.
    – APCoding
    Apr 24 '16 at 20:05

I figured it out myself! If you want to do this type

/summon FallingSand ~ ~20 ~ {TileID:54,Time:1,TileEntityData:{Items:[{id:143,Count:1,tag:{CanPlaceOn:["minecraft:stonebrick"]}}]}}

This will summon a chest with a button in it!

  • I thought you wanted a put the item in an already existing chest, no? That's what my answer does :P
    – APCoding
    Apr 24 '16 at 19:26
  • You should not be using the TileID tag (which is deprecated), nor numerical IDs. Use Block instead of TileID (in which you will specify a name ID), and "minecraft:wooden_button" would become the item ID.
    – Skylinerw
    Apr 25 '16 at 0:10
  • Last I checked, falling sand entities have been falling out of favour (no pun intended), especially for setting a single block. You can still do interesting things with falling sand, but it isn't as important as it used to be. I think it's mainly used for single command block contraptions that summon a whole bunch of other command blocks.
    – MBraedley
    Apr 26 '16 at 1:52

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.