Lock & Key
A datapack that locks doors and chests to a key.
No ratings yet
Be the first to rate it.
Community listing page
Community listing page, reviews may not be monitored by the author.
Community voices
Reviews
Log in to review this mod
Reviews are written by ModDex members. Log in and you'll come right back to the review form.
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description

Lock & Key
A datapack that locks a door or a chest to one key.
Introduction
Lock chests and doors with unique and unguessable keys!
Craft a key, sneak + right-click a door or a chest, and it is now locked! No player can break, open, or activate (via redstone) the locked block without the key!
[!NOTE] Explosions are still able to break locked objects
How to Use it
Craft the key with 5 Iron Nuggets and 1 Iron Ingot.

Name it. A key is identified by its signature (who first used the key) and its name. Renaming a key is unique from any other key!
[!TIP] Name your key in an anvil before you lock anything with it, and make a spare! There is no master key. Lose the key and the lock stays shut.
[!NOTE] Due to the limitations of Minecraft string comparison, a lock cannot have a
"character in the name. If it does, you will not be able to lock anything.
Lock it. Sneak and right-click a door or a chest while holding the key. This will automatically sign the key to your user.
Share it. Give somebody a copy of the key and they can open everything it locked. Craft another, sign it, name it the same, and it opens the same locks.
Make spares. Lock something while holding multiple unsigned keys and the entire stack is signed at once!
Unlock it. Sneak and right-click a locked door or chest while holding the key that locked it.
Features
- Doors cannot be opened with redstone. The door stays in the same state as when it was locked.
- Both halves of a double chest lock, and unlock, together.
- If the block is destroyed some other way (e.g. an explosion), the key is also destroyed.
- Unguessable locks. Locks are keyed via their name AND who signed it. Another player cannot create a key that will open your chest, even if the name is the same!
Installation
- Download the release
.zip. - Drop it into
<world>/datapacks/. /reload, or load the world.
Commands
| Command | Description |
|---|---|
/function lk:give |
Gives an unsigned Lock Key without crafting one. |
/function lk:uninstall |
Takes every lock off and removes any storage, tags, etc from the datapack. Run this before deleting the pack. |
[!TIP] If you lose the key, a locked block cannot be opened (except via explosion, etc). If you uninstall while a lock is in unloaded chunks, it will not be removed. To remove a lock without a key or datapack, run the following command near the lock:
/kill @n[type=minecraft:interaction,tag=lock.lock,distance=..5]
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
Stats
- Downloads
- <1,000
- Used in
- 0 modpacks
- Followers
- 0
- In stacks
- 0
- Created
- Last synced
-
Sep 18, 2026 5:00 PM UTC
New file updates sync automatically.
When ModDex last fully re-synced this project from CurseForge or Modrinth. A new file release triggers a resync usually within minutes, and every project is also re-synced on a schedule. Edits that don't ship a file, such as a new description or screenshots, are checked every few hours and can appear before this date changes.
How syncing works
External Links
Stats
- Downloads
- <1,000
- Used in
- 0 modpacks
- Followers
- 0
- In stacks
- 0
- Created
- Last synced
-
Sep 18, 2026 5:00 PM UTC
New file updates sync automatically.
When ModDex last fully re-synced this project from CurseForge or Modrinth. A new file release triggers a resync usually within minutes, and every project is also re-synced on a schedule. Edits that don't ship a file, such as a new description or screenshots, are checked every few hours and can appear before this date changes.
How syncing works
