How do I give myself an item that can only be placed on a block with a certain damage value?
I'm currently in the process of making a custom map and I want to add blocks that can only be placed on a certain colour clay.
This is the command I tried using.
/give @p cobblestone 1 0 {CanPlaceOn:["hardened_stained_clay"],Damage:3}
However, even with this command the cobblestone can be placed on any colour of stained clay. What command can I use for placing only on a certain block?
Best Answer
Unfortunately, the CanPlaceOn tag does not support Damage values as of yet. The syntax of that tag will only accept an array of strings that correspond to block names, therefore you cannot make the item be placed only on a specific colour, only hardened clay in general.
Also, you are currently trying to set a Damage value to the block to be placed rather than the block it should be placed on.
Pictures about "How do I give myself an item that can only be placed on a block with a certain damage value?"
How do you make it so an item can only be placed on a certain block?
Type the command in the chat window and press the Enter key to run the command. This /fill command would replace all blocks in the fill region, including air. The replaced blocks will be dropped and can then be collected as if they were mined with a pickaxe or shovel.Minecraft Tutorial: How to Make Items be Placed and Destroy Certain Blocks
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.