LockItem-Fabric
A client-side Fabric mod for Minecraft 1.21.1 that prevents accidental drops of hotbar items.
Quick challenge
How far can you run before the mobs catch you?
Minecraft check
Confirm your run
Complete the quick check to get your code.
LockItem-Fabric
Item Lock Mod
A client-side Fabric mod for Minecraft 1.21.1 that prevents accidental drops of hotbar items.
Features
- 🔒 Lock hotbar items (slots 1-9) to prevent dropping - 💾 Persistent locks (saved between game sessions) - 🎨 Visual lock indicator on items - ⌨️ Quick toggle with keybind (default: L) - 💬 Command-based control system - ✅ Works with vanilla, modded, and custom server items - 🎮 Compatible with Cobblemon and other mods
Commands
All commands are client-side only:
``` /lockitem lock - Lock currently held item /lockitem lock <1-9> - Lock specific hotbar slot /lockitem unlock - Unlock currently held item /lockitem unlock <1-9> - Unlock specific hotbar slot /lockitem toggle - Toggle lock on held item /lockitem list - List all locked slots /lockitem clear - Unlock all items /lockitem help - Show help message ```
Keybind
- L - Quick toggle lock on currently held item
Installation
1. Install Fabric Loader 0.17.2+ 2. Install Fabric API 0.116.6+ 3. Download the mod JAR 4. Place in `.minecraft/mods` folder 5. Launch Minecraft 1.21.1
Configuration
Config file location: `.minecraft/config/itemlock.json`
The config automatically saves locked slots and will restore them on next launch.
How It Works
- Locks are slot-based (hotbar slots 0-8) - Item fingerprint validation prevents accidental drops if items swap - Drop attempts are blocked at the client level - Visual indicators: 🔒 emoji overlay and tooltip - Compatible with custom NBT items from servers