Placing lever on specific stained clay colors? [duplicate]

Placing lever on specific stained clay colors? [duplicate] - Photo of Orange, Yellow, and Red Hello Molding Clay

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.



Best Answer

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"}



Pictures about "Placing lever on specific stained clay colors? [duplicate]"

Placing lever on specific stained clay colors? [duplicate] - Both Hands Stained With Paints
Placing lever on specific stained clay colors? [duplicate] - Word Equality Spelled on Clay
Placing lever on specific stained clay colors? [duplicate] - Brown Black and Yellow Stains on Rough Surface





THE ULTIMATE GEOMETRY DASH EDITOR GUIDE




More answers regarding placing lever on specific stained clay colors? [duplicate]

Answer 2

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.

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Maria Tyutina, Lisa, Sharon McCutcheon, Ekaterina Belinskaya