Mineuniverse
Log in Register
Mods

Door Lock

A simple Minecraft Fabric mod to lock doors, trapdoors, fence gates & chests.
by Vassbo
Download Claim this project
12,650 downloads
0 likes
Updated Jul 6, 2026
0 hypes
Adventure and RPG Technology

Door Lock

Door Lock is a simple Minecraft Fabric mod to lock doors, trapdoors, fence gates & chests.

Version

Currently working on Minecraft 1.21! Because this is Fabric you will also need the Fabric API!

You are free to include this in a modpack.

How does it work?

This mod adds 3 keys to the game; a normal iron "Key", a "Golden Key", and a "Universal key"!

The "Key" & "Golden Key" are the same, but visually different, right click a lockable block with the key to lock the block. To open, right click with the correct key in hand, or use the universal key.

You can also lock iron block types, this will allow you to open iron doors/trapdoors with the correct key in hand. By default the Universal key will not work on iron types.

When a block is locked, any redstone interaction is disabled by default, but that can be toggled in the config.

To remove a lock sneak (shift) right click on the block with the correct key in hand or the universal key. Breaking the block will also remove the key.

Lockable blocks

Here's a list of the currently supported blocks a key can lock:

  • Doors
  • Trapdoors
  • Fence gates
  • Chests
  • Shulker boxes

Setting a password

Each key needs a unique password, you can add a password by renaming in an anvil and adding #password (Item Name #my_secret_password), as shown in the image below. (NOTE: taking the item out normally will remove the #password in the name, but shift clicking to take it will keep the full name!)

Screenshots

screenshot screenshot

Crafting

Here's how you craft the "Key":

screenshot

And here's how the "Golden key" is crafted:

screenshot

The "Universal key" is only obtainable from commands, or the creative inventory.

Mod Config

  • disable_block_break_when_locked=*false*|true: Stop block break event if block is locked.
  • disable_redstone_when_locked=false|*true*: Stop redstone inputs from interacting with a locked block.
  • universal_unlocks_iron=*false*|true: Use universal key to unlock iron types.
  • show_password_on_key=false|*true*: Show key password in item tooltip.

Mod Commands

  • /password {value}: Set a password on a key in the main hand.
  • /keys {amount}: Give a set of keys in bulk with unique passwords.

License

Door Lock is licensed under the CC0-1.0 license. Read more here.

door_lock-1.2-1.21.jar
MC 1.21, Fabric, Client, 1.21.1, Server
Release 2024-10-10 Get

More from Vassbo

Dissolver - Item Transmutation
1,969

You Might Also Like

Rope Bridge
Ever wanted to build a rope bridge to an inaccessible area? With Rope Bridge, you can!
9,737,029
Ender IO Forestry
Forestry integration module for a modular Ender IO installation
998,058
Immersive Industry (1.16/1.20)
Introduce more various process and energy production machines to Immersive Engineering.
978,517
[IV/MTS] Q.M.P [Qawsed Military pack]
Military armor NATO and SOVIET Army
97,945
CreepTech
Technology + Adventure
9,965
[Immersive Vehicles] Ghost Corporation (Ghostride)
Pack for Immersive Vehicles, adds cars from my imagination
9,960