How to make a terracotta block with specific placing properties [duplicate]
John Thompson
Published May 05, 2026
I am trying to create a custom map where colored terracotta can only be placed on other terracotta blocks of the same color, but I don't know the command.
11 Answer
Unfortunately, you can not specify data values with CanPlaceOn which rules out being selective of color or any other block variant.
The closest you can get is a white terracotta block that can only be placed on a dyed terracotta block of any color.
If that works, here is the command:
/give @p minecraft:stained_hardened_clay 1 0 {CanPlaceOn:["minecraft:stained_hardened_clay"]} 1