Mineuniverse
Log in Register
Mods

Smart Keep Inventory

Configure when keep inventory should be enabled
by flemmli97
Download Claim this project
752 downloads
0 likes
Updated Jul 6, 2026
0 hypes
Server Utility Utility & QoL

neoforge fabric

discord-singular kofi-singular-alt patreon-singular


Smart Keep Inventory

In vanilla you can only either have keep inventory enabled all time or not. Smart Keep Inventory allows you to decide under which conditions the players inventory should be kept upon death.

For example you can have it configured to only allow keep inventory if the player is killed by a specific mob.

By default this mod makes it so players will keep their inventory and experiences if they are killed by bosses (mobs tagged as c:bosses)

⚙️ Configuration

Configuration is done via a datapack.

Conditions are defined via a file under data/<namespace>/smart_keep_inventory/condition and have the following format:

{
  "player": <EntityPredicate>, // Optional. This is the player that died
  "killer": <EntityPredicate>, // Optional. This entity that killed the player. Directly or indirectly
  "damage": <DamageSourcePredicate>, // Optional. The damagesource that killed the player
  "keepExperience": <true | false>, // Default true. Whether to also keep the players experiences or not
  "disabled": <true | false> // Optional. Only used to disable an EXISTING condition with the same id
}

For more information about predicates check out the minecraft wiki under https://minecraft.wiki/w/Predicate

The mod also allows you to invert EntityPredicate. The syntax for that is as follow:

// Instead of just <EntityPredicate> wrap it like this
{
    "invert":true,
    "predicate": <EntityPredicate>
}

Example:

This allows the player to keep their inventories if they are killed by a zombie but not their xp.

{
  "killer": {
    "type": "minecraft:zombie"
  },
  "keepExperience": false
}

The following is the default configuration of the mod applying to bosses:

{
  "killer": {
    "type": "#c:bosses"
  }
}

Compability

This mod should support any mod adding inventories (Curios, Accessory etc.) provided they respected the gamerule already.

Gravestone mods should also be supported if they already check the gamerule. If a player keeps their inventory a grave should not be generated in that case.

smart_keep_inventory-26.1.2-1.1.0-fabric.jar
MC Fabric, 26.1.2
Release 2026-06-28 Get
smart_keep_inventory-26.1.2-1.1.0-neoforge.jar
MC NeoForge, 26.1.2
Release 2026-06-28 Get

More from flemmli97

Simple Quests (Fabric)
8,646
MobSpawnFix
716
TenshiLib (Fabric)
690,570
Flan (Forge, NeoForge)
6,256,945
Advanced Golems (Fabric)
59,699
Mob Battle Mod (Fabric)
55,665

You Might Also Like

Liberty's Villagers
Quality of Life and AI improvements for Villagers
9,968,428
No More Pop-ups
A Minecraft mod to remove in-game pop-ups
996,708
BetterRandomSourceConcurrencyCrash
Improved logging of crashes caused by mods accessing RandomSources from the wrong thread
99,371
Exit Confirmation
Often accidentally closed Minecraft? This mod might help!
99,067
NoDynamicFps
Adds an option to disable Vanilla's Dynamic FPS implementation
99,004
Immersive Crafting
Adds crafting recipes to immersive portals
9,998