-2

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
  • 1
    Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins! – Frank Sep 17 '17 at 14:39
0

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
  • 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

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