Overview#
The Locks Mod, created by Melonslise, is a unique utility mod that introduces a flexible and universal locking system to Minecraft. Unlike traditional locking mods that only work on specific containers, this mod allows players to dynamically attach locks to almost any block, including those from other mods. It features a dedicated lock picking minigame, key management systems, and world-generation integration where chests in dungeons and structures may spawn pre-locked.
Key Features
- Universal Locking: Attach locks to doors, chests, furnaces, trapdoors, and even modded blocks.
- Spatial Locking: A single lock can cover multiple blocks at once (e.g., double chests or double doors).
- Lock Picking Minigame: An interactive GUI where players must manipulate pins to crack a lock.
- Key Management: Tools like the Key Ring and Locksmith's Workbench help organize and duplicate keys.
- World Generation: Naturally spawning chests in the world can generate with locks and varying levels of difficulty.
Mechanics#
Locking Blocks
To lock a block, you must first have a Lock and a Key with matching IDs.
- Binding: Place a Blank Key and a Lock in a crafting grid or the Locksmith's Workbench to pair them.
- Placement: Sneak and right-click the target block with the Lock in your hand. The lock will appear as a physical 3D model on the block's surface.
- Universal Support: This works on any block with an inventory or interaction (Doors, Gates, Furnaces, etc.).
Lock Picking
If you do not have the matching key, you can attempt to bypass the lock using a Lock Pick.
- Right-click a locked block with a Lock Pick to open the minigame interface.
- Controls: Use the A and D keys to move the pick horizontally. Use the W key to push a pin upward.
- The Goal: You must find the correct sequence to lift all pins. If you push the wrong pin, there is a chance the lock pick will break, and all pins will reset.
- Difficulty: Higher-tier locks (Gold, Diamond) have more pins and higher resistance to picking.
Protection Properties
Locked blocks gain several protective attributes:
- Explosion Resistance: Locked blocks are significantly harder to destroy with TNT or Creepers.
- Automation Block: Hoppers cannot pull items from a locked container, and pistons cannot move locked blocks.
- Redstone Security: Locked doors and trapdoors cannot be opened by redstone signals (levers, buttons, pressure plates) unless unlocked.
Items#
The mod adds several tiers of locks and tools. Higher tiers generally offer more pins (making them harder to pick) and higher durability.
| Item | Description | Pin Count |
|---|---|---|
| Iron Lock | The standard lock tier. Reliable and affordable. | 7 Pins |
| Gold Lock | A high-tier lock. While it has fewer pins than Iron, it is highly enchantable. | 6 Pins |
| Diamond Lock | The ultimate security. Extremely difficult to pick and nearly indestructible. | 11 Pins |
| Steel Lock | Requires a mod that adds Steel. Offers high resistance. | 9 Pins |
| Blank Key | A base key used to bind with locks or create duplicates. | N/A |
| Lock Pick | Available in Iron, Gold, and Diamond tiers. Higher tiers break less often. | N/A |
| Key Ring | A utility item that can hold multiple keys. Right-clicking a lock with a Key Ring will automatically try all keys inside. | N/A |
| Master Key | A Creative-mode only item that can open any lock instantly. | N/A |
| Locksmith's Hammer | Used to remove locks from blocks without destroying the block itself. | N/A |
Blocks#
Locksmith's Workbench
The Locksmith's Workbench is the central hub for all lock-related crafting. It is used to pair keys with locks, duplicate existing keys, and apply enchantments.
- Binding: Place a Lock and a Blank Key to give them a matching unique ID.
- Duplication: Place a paired Key and a Blank Key to create a copy of the original key.
- Removal: Some versions allow the workbench to "reset" a lock back to a blank state.
Recipes#
Most recipes in the mod utilize Iron Ingots and Iron Nuggets.
| Result | Ingredients | Pattern |
|---|---|---|
| Locksmith's Workbench | 4x Any Wood Planks, 2x Iron Nuggets | Planks in a 2x2 square, Nuggets on top |
| Blank Key | 1x Iron Ingot, 4x Iron Nuggets | Ingot in center, Nuggets in a cross shape |
| Iron Lock | 3x Iron Ingots, 5x Iron Nuggets | Ingots in top row, Nuggets in a 'U' shape below |
| Iron Lock Pick | 3x Iron Ingots | Three ingots in a diagonal line |
| Key Ring | 4x Iron Nuggets | Nuggets in a small diamond shape |
Enchantments#
Locks and Keys can be enchanted to provide additional security or utility.
- Shocking: When a player fails a lock picking attempt, they are struck by a bolt of energy, dealing damage.
- Persistence: Increases the explosion resistance of the locked block and makes it take longer to break by hand.
- Security: Increases the difficulty of the lock picking minigame by adding "phantom" pins or increasing pick breakage chance.
- Trigger: The block will emit a redstone signal whenever a failed lock picking attempt occurs.
- Awareness: A key enchantment that allows the player to see the outline of the matching lock through walls at short distances.
Configuration#
The mod is highly configurable via the locks-common.toml file (or the world-specific config folder in 1.14+). Server admins can adjust the following:
- Generation Chance: The probability that a chest in a generated structure (like a Stronghold or Village) will spawn with a lock.
- Max Pins: The maximum number of pins a naturally generated lock can have.
- Allow Breaking: Whether players can bypass locks by simply breaking the block (default is usually set to make the block much harder to break).
- Blacklist: A list of blocks that cannot be locked under any circumstances.