lever

Create a lever. The lever points in the direction you set.

blocks.lever(BLOCK_BOTTOM_EAST_WHEN_OFF);

Parameters

  • position: the position of the lever

You can read about the lever positions you can use in Minecraft wiki.

Example

Place a stone block near the player. Attach an upside-down lever to the stone that points South.

blocks.place(STONE, pos(1, 2, 0));
blocks.place(blocks.lever(LeverPosition.BlockBottomPointsSouthWhenOff), pos(1, 1, 0));