How can I make a block only be placed on certain other blocks
I want people to only be able to place TNT on only Quartz Blocks and I've see this done before where you can only place blocks on certain other blocks but I'm not sure of the command used to do that.
Does anyone know?
Best Answer
Type this in commands:
/give (your name) minecraft:TNT 1 0 {CanPlaceOn:["minecraft:quartz_block"]}
IMPORTANT:
You can change
minecraft:TNT 1 0 {CanPlaceOn:["minecraft:quartzblock"]}
to whatever you like.
Pictures about "How can I make a block only be placed on certain other blocks"



How do you make things break only certain blocks in Minecraft?
You can't place a block on a block with a right click action without pressing shift . However, when you fly in creatve mode and hold shift and space at the same time, then you will stay at the same hight, so it's possible to place a block on a block with a right click action while floating in creative mode.Minecraft Tutorial: How to Make Items be Placed and Destroy Certain Blocks
More answers regarding how can I make a block only be placed on certain other blocks
Answer 2
Lever that you can place on diamond block! Can be used in Custom/Puzzle-Map!/give [Username] lever 1 0 {CanPlaceOn:["minecraft:diamond_block"]}
That is a lever that you can place on diamond block! You can change it!:
/give [Username] [block] 1 0 {CanPlaceOn:["minecraft:**[Your block]**"]}
Or can place on more blocks!
/give [Username] [block] 1 0 {CanPlaceOn:["minecraft:[Your block],minecraft:[2nd block]"]}
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Алесь Усцінаў, Anna Panchenko, Ruslan Alekso, Maria Orlova
