
Video: How to Build a Keycard Mechanism/Item Filter to use for your builds! - Minecraft Tutorial by Fa1axy
How to build it
- Build the item filter frame
Place the building blocks to form a standard item sorter frame: a top row for the comparator and dust, and a bottom row housing a repeater and a locking redstone torch.
- Place the torch, repeater, and comparator
Attach a redstone torch on the front face of the lower block under where the filter hopper will sit. Behind that block, place a redstone repeater pointing into it, and on top place a redstone comparator facing away from the hopper side.
- Wire the redstone dust and hoppers
Run redstone dust from the output of the comparator down to the block feeding the bottom repeater. Place the top filter hopper pointing sideways into the comparator, and a second hopper directly underneath it pointing into a chest (or return line).
- Create and copy the signed book keycards
Open a Book and Quill, type a random string of characters on the first page, and sign it with any title without opening it afterward. Craft two copies of this unread signed book to make 3 identical stackable written books.
- Rename 18 filler items on an anvil
Take 18 stackable items (such as bowls) to an anvil and rename them to a random text string so ordinary items cannot accidentally enter those slots.
- Load the filter hopper and wire the output
Open the top hopper, distribute the 18 renamed filler items across the rightmost four slots, and put 2 of the copied signed books into the first slot. Place a second redstone repeater leading out from the filter circuit to power a redstone lamp, door, or mechanism when the third keycard is inserted.
How it works
This mechanism relies on a standard hopper item filter tuned for 16-stackable items (signed written books stack to 16):
- Idle state: The top hopper holds 2 signed books in the first slot (equivalent to 8 regular 64-stack items) plus 18 renamed filler items in the remaining four slots. This produces a comparator signal strength of 2, which is not quite strong enough to reach the repeater at the end of the dust line. Meanwhile, the redstone torch underneath keeps the bottom hopper locked.
- Inserting the keycard: Dropping the matching 3rd signed book into the top hopper pushes the item count across the threshold for signal strength 3.
- Unlocking and output: Signal strength 3 powers the lower repeater, which turns off the redstone torch for a brief moment and sends an output pulse through the output repeater to the connected door or lamp.
- Keycard return: While the torch is off, the bottom hopper unlocks just long enough to pull 1 signed book out of the filter hopper and deposit it into the return chest or dropper, resetting the lock to 2 books.
Tips & variations
- Do not open the signed book: As shown in the video, opening and reading a freshly signed book adds an NBT tag to it, which prevents it from stacking with unread copies in the hopper.
- Why signed books are secure: Because a signed Book and Quill records the author's username and cannot be forged, another player cannot duplicate the keycard even if they copy the exact text on the page.
- Input and return variations: A dropper with a button can be placed above the hopper to insert the keycard neatly, or a solid block can be pushed over a hopper minecart using a piston so the keycard can be thrown straight onto the floor.


