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
  • Thanks for the explanation. That information would have been invaluable on the wiki. – Alex Diamond Aug 8 '16 at 5:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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