A "Lockdown" function for Minecraft?

Solution 1:

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):

enter image description here

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):

enter image description here

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)

enter image description here

Solution 2:

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)

You can see how to create logic gates on the minecraft wiki