
Video: Minecraft 1.12: Redstone Tutorial - Simple Combination Lock (Programmable!) by MrCrayfish
How to build it
- Build the Lever Wall
Construct a solid wall that is 9 blocks wide and 2 blocks high. You can frame or decorate around it as needed.
- Place the Five Levers
On the front face of the wall, place 5 levers along the top row, leaving a 1-block gap between each lever.
- Program the 'Up' Levers
Go behind the wall to set your code. For every lever you want to stay UP (OFF) in your combination, place a redstone torch on the back of the block the lever is attached to, then place a solid block directly beneath that torch.
- Program the 'Down' Levers
For every lever you want to be pulled DOWN (ON) in your combination, place a solid block one level below the lever block on the back of the wall, and put a piece of redstone dust on top of it.
- Add the Inverter Blocks
Place one solid block directly behind each of your five programmed outputs (sticking out one block further from the redstone torches and redstone dust you just placed).
- Attach the Output Torches
Place a redstone torch on the side of each of those five blocks so that all five torches face the same direction along the back of the wall.
- Run the Main Redstone Line
Lay a continuous line of redstone dust along the ground directly underneath those five side-mounted redstone torches, running from the first torch to the last.
- Connect the Torch Tops
For the 'Up' lever slots—which have a redstone torch directly against the wall—place a piece of redstone dust on top of the block in front of that torch so the signal carries into the side torch.
- Install the Master Inverter
At the end of the bottom redstone dust line, place a solid block so the dust runs directly into it. Attach a final redstone torch to the side of this block facing toward your doorway.
- Wire the Door
Dig a small trench from the final redstone torch to the block beneath your iron door and connect them with redstone dust. Cover the trench and place your iron door.
How it works
This circuit functions as a large multi-input AND gate connected to an iron door:
- Signal Normalization: Every lever slot is wired so that entering the correct state powers the inverter block behind it.
- For an UP (OFF) lever, the wall torch stays lit by default. Putting redstone dust on top of the block in front of it powers that block. If someone flips the lever down, the wall torch turns off, unpowering the block.
- For a DOWN (ON) lever, pulling the lever powers the wall block, which energizes the redstone dust behind it and powers the inverter block.
- The AND Gate Line: Each inverter block holds a side-mounted redstone torch over a shared redstone dust line. As long as any lever is in the wrong position, its corresponding inverter block is unpowered, keeping its side torch ON and flooding the bottom redstone line with power.
- Unlocking the Door: When all five levers match the programmed code, all five inverter blocks are powered simultaneously. This turns OFF all five side torches, allowing the bottom redstone line to completely de-power. The master inverter torch at the end of the line then turns ON, sending power underground to open the iron door.
Tips & variations
- Reprogramming the Code: You can change the combination at any time from the back room by swapping an 'Up' module (torch + top dust) with a 'Down' module (lower block + dust).
- Material Counts Vary: Because 'Up' levers require an extra redstone torch and top dust compared to 'Down' levers, your exact torch and dust total will change slightly depending on how many up vs. down levers you choose.
- Use an Iron Door: While a wooden door works for testing, always use an iron door in survival so other players cannot simply right-click the door to bypass the lock.
- Expanding the Lock: You can add more levers to make the code harder to guess by extending the wall by 2 blocks per new lever (up to the 15-block redstone signal limit before needing a repeater).





