Keep My Hotbar
Keep your hotbar. Recover the rest.
Keep the nine stacks in your hotbar when you die so you can return with your tools, food and weapons to recover the rest. The other 27 inventory slots drop normally. Your hotbar layout and selected slot are restored.
Features
- Retain all nine hotbar slots after death, with stack counts, names, enchantments and other item data.
- Optional equipped armor and offhand retention.
- Optional durability penalty, from 0 to 100 percent of maximum durability, rounded up. Kept equipment always has at least one durability left.
- Pending items are serialized in player save data until respawn, including death-screen save/quit.
- Run
/keepmyhotbarto read active settings.
XP follows vanilla rules. Curse of Vanishing still applies. When keepInventory
is enabled, vanilla keeps everything and this mod applies no penalty.
Requirements and installation
Requires Minecraft 1.21.1, NeoForge 21.1.264 or newer in the 21.1 series, and Java 21. No extra library mods are needed.
Put the JAR in the server's mods folder, or your local instance's mods folder
for singleplayer. Multiplayer clients do not need this mod. A client-only installation
cannot change a multiplayer server's death rules.
Configuration
With the world/server stopped, edit <world>/serverconfig/keepmyhotbar-server.toml:
keepHotbar = true
keepArmor = false
keepOffhand = false
durabilityPenaltyPercent = 0
The defaults keep only the hotbar. Armor and offhand drop normally. Non-damageable stacks are unchanged by the penalty.
First beta
Version 0.1.0-beta.1 passed 15 automated Minecraft GameTests with real ServerPlayer instances. Tests cover retained/dropped counts, death and respawn-copy code, item data, Vanishing, cancelled deaths, player-data save/load and duplicate-restoration prevention.
No manual client playthrough or certified integration testing with grave, soulbound, custom-inventory or other death-changing mods has been completed. Test a copy of your world when combining these systems. Extra equipment slots such as Curios are outside this mod's scope. Ordinary Minecraft saves are used; recovery of unsaved data after a hard crash is not guaranteed.
AI disclosure: this project contains code and documentation generated with AI assistance. The icon is an original programmatically drawn design, not an in-game screenshot.
Modpacks are welcome. MIT licensed.
Not an official Minecraft product. Not approved by or associated with Mojang or Microsoft.

