What is the format for the
block data and
data value of a lever in the On position?
I read the following on the wikis but I still couldn't figure it out.
Bit | Values
0x8 | If this bit is set, the lever is active.
The metadata value of the block determines both the direction the lever is facing as well as whether it's on or off. To "set bit 8", you simply add 8 to the metadata value:
For example, a lever facing east that is off:
/setblock ~ ~1 ~ minecraft:lever 1
And a lever facing east that is on:
/setblock ~ ~1 ~ minecraft:lever 9