Smart Keep Inventory
Dying in Minecraft has always been a harsh teacher. You lose your gear, your levels, and sometimes your patience. Vanilla offers only one blunt tool for this: the keepInventory gamerule, which is either on or off for everyone, all the time. Smart Keep Inventory changes that completely by letting you decide exactly under which conditions a player's inventory and experience should be preserved. It is a small mod with a big impact on how survival worlds and servers feel.
Why You Need Smart Keep Inventory for Minecraft
Think about the situations where losing everything feels unfair rather than challenging. A boss fight that wipes the whole party, a surprise ambush by a Warden, or a lag spike during a raid. With this mod, you no longer have to choose between a punishing vanilla experience and a blanket keepInventory rule that removes all risk. Instead, you define precise conditions, and the mod handles the rest.
By default, Smart Keep Inventory makes players keep their inventory and experience if they are killed by bosses, meaning any mob tagged as c:bosses. That alone covers many modpacks out of the box, but the real power comes from customization.
How the Configuration Works
Everything is configured through a datapack, which keeps things clean and server-friendly. Conditions live in a file under data/<namespace>/smart_keep_inventory/condition and follow a simple JSON format. Each condition can include:
- player — an optional EntityPredicate for the player who died
- killer — an optional EntityPredicate for the entity that caused the death, directly or indirectly
- damage — an optional DamageSourcePredicate for the killing damage source
- keepExperience — defaults to true; set it to false to drop XP while keeping items
- disabled — turns off an existing condition with the same id
You can also invert any EntityPredicate by wrapping it in an object with "invert": true and a "predicate" field. For example, a condition with a killer of type minecraft:zombie and keepExperience set to false lets players keep their items but not their XP when a zombie finishes them off. The default boss configuration is just a killer predicate pointing at the #c:bosses tag.
Installing the Mod and Datapack
If you are wondering how to install everything, the process is straightforward. Place the mod jar in your mods folder, then drop your condition datapack into the world's datapacks folder. The mod is available for modern Minecraft releases on the Fabric and NeoForge loaders, so check that your game version matches the file you grab. When you download Smart Keep Inventory, confirm the loader and Minecraft version in the file name before launching. For players who prefer a smoother path, the foxygame.net launcher offers a one-click install for Smart Keep Inventory, handling the correct loader and version automatically so you can get straight to configuring your conditions.
Compatibility With Other Mods
Smart Keep Inventory is designed to play nicely with the wider modding ecosystem. Any mod that adds inventory slots, such as Curios or accessory-style mods, should work as long as those mods already respect the vanilla gamerule. Gravestone mods are also supported, provided they check the gamerule before spawning a grave; if a player keeps their inventory, no grave is generated. That means you can combine conditional inventory keeping with your favorite death-recovery systems without conflicts.
Practical Use Cases
Servers often use this mod to soften only the harshest deaths. You might keep inventories after boss kills but leave regular exploration risky. Or you could preserve XP for players slain by other players in PvP, while mob deaths stay punishing. Because conditions are datapack-driven, you can ship different rule sets per world or update them without touching the mod itself.
Final Thoughts
Smart Keep Inventory gives you the fine-grained control that vanilla Minecraft never offered. It respects the challenge of survival while removing the frustration of losing everything to a single boss wipe. Whether you run a small SMP or a heavily modded pack, configuring a few condition files is all it takes to make death feel fair again. Grab the right build for your loader, set up your datapack, and let the mod decide what you keep.