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.
Add a comment
|
2 Answers
Use
/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– ColeCommented Apr 24, 2016 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.– APCodingCommented Apr 24, 2016 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– APCodingCommented Apr 24, 2016 at 19:26
-
You should not be using the
TileID
tag (which is deprecated), nor numerical IDs. UseBlock
instead ofTileID
(in which you will specify a name ID), and "minecraft:wooden_button" would become the item ID. Commented Apr 25, 2016 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. Commented Apr 26, 2016 at 1:52