Conditional Keep Inventory
Death in Minecraft always comes with a sting. The vanilla keepInventory gamerule is a blunt instrument: either you lose everything on every death, or you keep everything and the game loses its edge. What if you could fine-tune that rule, keeping your precious items when you fall into the void but still facing the consequences of a creeper ambush? That is exactly what the Conditional Keep Inventory add-on delivers. It hands you the reins, letting you decide which deaths are punishing and which are forgiving.
What Is Conditional Keep Inventory?
Conditional Keep Inventory is a Fabric mod that replaces the all-or-nothing keepInventory gamerule with a customizable system. Instead of a simple true/false toggle, you get a whitelist and a blacklist of death causes. Through a straightforward config file and an in-game command, you can specify exactly when your items should stay with you and when they should drop. The mod works entirely server-side, meaning players joining your world do not need to install anything on their own clients. It is a seamless quality-of-life upgrade for any survival server or single-player world.
Key Features and How It Works
At its core, the mod intercepts the death event and checks the cause against your defined conditions. You can whitelist certain damage sources—like void, fall, or drowning—so that dying from those keeps your inventory intact. Conversely, you can blacklist sources like mob attacks or lava, ensuring those deaths still carry the traditional risk. The logic is simple: if a death cause matches a whitelist entry, keep inventory; if it matches a blacklist entry, drop items. You can even mix both lists for granular control.
The configuration lives in a .json file inside the mod's folder, but you can also tweak settings on the fly with the /conditionalkeepinventory command. This makes it easy to adjust rules without restarting the server. Because it is server-side only, you can add it to an existing world without asking every player to download Conditional Keep Inventory for Minecraft—they just connect and the rules apply automatically.
Supported Minecraft Versions and Loader
Conditional Keep Inventory is built for the Fabric mod loader and currently supports Minecraft 1.20.1 and 1.19.4. Older versions like 1.18.2 may also be available depending on the latest release. The mod requires the Fabric API to function, so make sure you have that installed as well. Since it is a server-side mod, you only need to place it in your server's mods folder; clients can remain completely vanilla. This makes it an ideal choice for multiplayer servers that want to offer a tailored experience without forcing players to mod their game.
How to Install Conditional Keep Inventory
Getting started is straightforward. First, ensure you have the Fabric loader installed for your Minecraft version. Next, download the Fabric API from Modrinth and place it in your mods folder. Then, download Conditional Keep Inventory from its Modrinth page—look for the file matching your game version. Drop the .jar into the same mods folder. If you are setting up a server, repeat these steps in the server's directory. Launch the game or server, and the mod will generate a default config file you can edit later.
For those who prefer a more streamlined approach, the foxygame.net launcher offers a one-click install for Conditional Keep Inventory directly from its built-in add-on catalog, handling version compatibility and automatic updates so you never have to dig through folders manually.
Configuring Your Keep Inventory
Once installed, open the config file at config/conditional_keep_inventory.json. Here you will find two main arrays: whitelist and blacklist. Each entry is a damage source identifier, such as "minecraft:void", "minecraft:mob", or "minecraft:fall". Add the causes you want to protect or penalize. For example, to keep items only when dying from the void or a fall, set the whitelist to those two and leave the blacklist empty. To keep items from everything except player kills and lava, blacklist those two and leave the whitelist empty. The mod processes the whitelist first; if a death cause is on the whitelist, items are kept regardless of the blacklist.
You can also use the in-game command /conditionalkeepinventory whitelist add minecraft:void to modify lists without editing files. This is perfect for server admins who want to test different setups on the fly. Remember, changes take effect immediately for all subsequent deaths.
Use Cases and Examples
Imagine you are building a massive nether hub over a lava ocean. One misstep and you lose your entire set of enchanted netherite gear—frustrating and time-consuming. With Conditional Keep Inventory, you can whitelist minecraft:lava and minecraft:void so those accidents are just a minor setback. Meanwhile, keep mob deaths blacklisted so that a surprise ghast fireball still carries the thrill of danger. Another popular setup is a "hardcore-lite" experience: whitelist nothing, but blacklist only minecraft:void to ensure the void remains the ultimate threat while all other deaths drop items normally.
Server owners love this mod for community play. You can create a world where new players are protected from environmental deaths but veterans still face consequences in combat. The flexibility means you can tailor the experience to your server's unique theme without writing a single line of code.
Why Choose Conditional Keep Inventory Over the Gamerule?
The vanilla keepInventory gamerule is binary. It forces you to choose between total safety and total risk. Conditional Keep Inventory gives you a spectrum. You preserve the adrenaline of a dangerous cave exploration while removing the soul-crushing tedium of losing everything to a random void glitch. It respects your time and your playstyle. Plus, because it is server-side, you can change the rules without restarting or asking players to install anything. The mod is lightweight, open-source, and actively maintained on Modrinth, with a clear wiki and issue tracker for support.
Final Thoughts
Conditional Keep Inventory fills a gap that many Minecraft players have felt for years. It is the perfect middle ground between casual and hardcore, giving you control over what truly matters. Whether you are a solo adventurer tired of void deaths or a server admin crafting a custom experience, this mod is a must-have. Download Conditional Keep Inventory today from Modrinth, tweak the config to your liking, and never again lose your hard-earned gear to a death you did not deserve—while still keeping the game exciting where it counts.