# A “Lockdown” function for Minecraft?

Hey guys, just wondering, I have a large house/base that is divided into four sections. I want to implement a redstone circuit that will automatically close all the doors that are connected to the adjacent building (I plan to have four control rooms, one per section). Do you think this is possible? If so, could you please provide a circuit map via redstone simulator? Thanks.

-
So, you have a building with a NW, NE, SW, and SE quadrant, and you want a button/lever in the NW to close the NE and SW, etc? I assume you want the circuit to determine if a door is already closed so it doesn't cycle it open, correct? – Kevin Yap Feb 2 '11 at 21:22

There are a few basics to understand before jumping into this:

• Single doors require an `on (1)` state to be open, and an `off (0)` state to be closed.
• Secondary doors on a double door set require an `off (0)` state to be open, and an `on (1)` state to be closed.
• Wooden doors require a change of state to close

Assume a door has two inputs:

1. opening/closing the door (`A`)
• 1 means door is open unless overridden
• 0 means door is closed unless overridden
2. overriding the default behavior (`B`)
• 1 means door should be overridden
• 0 means door should be left as is

Logic table:

``````A|B|force open|force closed|
=+=+==========+============+
0|0| 0        | 0          |
0|1| 1        | 0          |
1|0| 1        | 1          |
1|1| 1        | 0          |
``````

The secondary doors just need to get a negated input of the primary doors.

To force open, perform a logical `OR` on the inputs. (`A OR B`) To force close, negate `B` and perform a logical `AND` on the inputs. (`A AND !B`)

-

There are a number of ways to accomplish this, but I'll do it a simple way. Let's say you have a button next to each door to open it (causing it to stay open), and a button in each room to close the doors.

First, you would need to wire each door up to its own RS-NOR latch. Here is an image from the Minecraft Wiki (I personally like design A):

An RS-NOR latch is effectively a 1 bit memory cell, storing either an off (0) or on (1) position. The R and S in the image are inputs, and Q is the output (the Q with a line over it means it is always the opposite of Q). When the latch receives an input from S, Q turns on. When R is received, Q turns off.

Wire your door to the Q output, and the button to open the doors with to the S input. Then, wire the buttons used to reset the doors to R. You may need to use repeaters to carry the signal far enough (two NOT gates in sequence):

By doing this, you have a button next to the doors to enter, and a button to close all the doors (or leave them closed if they are already).

Something to the effect of this, but more doors and RS-NORs (rhyme not intended) - complete with freehand circles! (made more evident by being drawn with a trackpad)

-
Thanks, and this may work, but I was planning on making the same same button close the same set of doors. Could you help with that (thanks for everything so far, anyway)? – Caleb Xu Feb 2 '11 at 23:44
Just wire each button to the respective RS-NORs of the doors you want to close. – Kevin Yap Feb 2 '11 at 23:46
All right, thanks! – Caleb Xu Feb 3 '11 at 1:20
A simpler setup might be vertical pistons with glass & sand instead of the RSNOR latch. – Broam May 8 '12 at 19:39