Minecraft – How to give theself an item that can only be placed on a block with a certain damage value

minecraft-commandsminecraft-java-edition

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.