4

I'm pretty new to command blocks, but I managed to understand the basics of the CanPlaceOn command for my adventure map. However, I want the player to be able to place levers on green stained clay. How do I specify a specific color of stained clay for lever placement? Also, if anyone could tell me if there is a way to hide the tag on the lever that it "Can Be Placed On: Stained Clay", that would be wonderful.

0
1

This is currently not possible as CanPlaceOn/CanDestroy can only specify the base ID, no data values.

To hide the "Can be placed on" tooltip, you can use bit 16 of the HideFlags bitfield.

/give @p minecraft:lever 1 0 {HideFlags:16,CanPlaceOn:"minecraft:stained_hardened_clay"}
0

This is a limitation with minecraft. You cannot choose blocks with a specific data value with canPlaceOn or canDestroy. I would suggest using a different block, or if you really want clay textures, creating a custom resource pack that gives another block the clay texture, and using that blog.

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