4

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?

2
  • Texenox is right that you're currently putting the damage value onto the cobblestone. I don't think there is a way to only allow placing a block on blocks with a certain damage value. Unfortunately you may just need to change your map's block palette to account for this.
    – SirBenet
    Commented Jul 19, 2015 at 0:43
  • The concept of damage values no longer exists in 1.13
    – pppery
    Commented Apr 14, 2019 at 1:21

1 Answer 1

8

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.