Your inventory remembers where things belong.
Ghost Slots is a small Fabric client mod for Minecraft 1.21.11. It focuses on inventory slot memory rather than sorting: assigned slots remember the item that belongs there, show a lock/ghost visual, and try to receive matching stacks before vanilla inventory movement.
ghost-slots-0.2.5-pvp-safe.jar: default recommended build. Supports hotbar, main inventory, and armor locks. Offhand locking is disabled, so totems are never auto-refilled.ghost-slots-0.2.5-full-offhand.jar: full build. Supports hotbar, main inventory, armor, and offhand locks. This can auto-refill totems if a totem is locked in offhand.
Install only one Ghost Slots jar at a time.
Checked-in install jars are under release-jars/1.21.11/.
- Create or open a Minecraft Java
1.21.11Fabric profile. - Make sure Fabric API for
1.21.11is installed in the profile'smodsfolder. - Remove any older
ghost-slots-*.jarfiles from the profile'smodsfolder. - Copy exactly one jar from
release-jars/1.21.11/into the profile'smodsfolder. - For normal survival/PvP-adjacent use, choose
ghost-slots-0.2.5-pvp-safe.jar.
- Hover a player inventory or armor slot and press
Gto lock that slot to its current stack. - Carry a stack, hover an empty player inventory or armor slot, and press
Gto lock that carried stack to the slot. - Hover a locked slot and press
Xto unlock one slot. - Hold
Xand drag with left mouse across slots to unlock multiple slots. - Use the inventory overlay
Unlock Allbutton to clear every lock.
The full-offhand build also allows the same controls on the offhand slot.
Middle-click is not used.
- Inventory and armor locking are enabled by default.
- Offhand locking is only available in the full-offhand build.
- Empty locked slots render a dim saved-item ghost image.
- Occupied locked slots render a small lock marker and border.
- Picked-up items that vanilla placed in a locked slot are moved out unless they match the saved item ID.
- Picked-up items that vanilla placed elsewhere in the player inventory are recovered into empty matching locked slots while no screen is open.
- Manual placement of the wrong item ID into a locked slot is blocked while the inventory screen is open.
- Left-clicking while carrying a matching stack routes it into an empty matching ghost slot first.
- Shift-left-clicking from a container routes a matching stack into an empty ghost slot before vanilla quick-move behavior.
- No full inventory sorting, wireless restock, or broad category matching is included.
The mod writes config files under .minecraft/config/:
ghostslots.jsonghostslots-memory.json
ghostslots.json options:
{
"gearFallback": false,
"axeWeaponFallback": false
}Gear fallback is intentionally narrow:
- Armor fallback stays armor-slot-specific.
- Sword fallback stays sword-specific.
- Axe fallback is disabled unless
axeWeaponFallbackis true. - Blocks, food, redstone, tools, and general inventory items never use fallback matching.
This project uses Fabric Loom and the checked-in Gradle wrapper.
$env:JAVA_HOME='C:\Program Files\Java\jdk-21'
$env:Path="$env:JAVA_HOME\bin;$env:Path"
.\gradlew.bat buildThe verified jar is produced at:
build/libs/ghost-slots-0.2.5-pvp-safe.jar
Build the full offhand variant with:
.\gradlew.bat clean build '-Pghostslots.allowOffhand=true' '-Pghostslots.variant=full-offhand'