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.

  • 1

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"]}
  • This isn't going to be an issue in 1.13, but unfortunately, that's still a ways off, even for snapshots. – MBraedley Sep 18 '17 at 14:59
