Inspired by PuckiSilver's Keep Some Inventory datapack.
Keep Some Modded Inventory is an alternative to Minecraft's keepInventory: you can keep your equipment (swords, pickaxes, etc.), but your other items (food, torches, etc.) will drop on death. This means it is much easier to get back to your stuff, but dying still has a penalty. Additionally, it has some small QoL features to make dying less of a chore.
Features
By default...
- Vanilla and modded equipment will stay in your inventory when you die.
- Your resources will drop exactly where you died, with no splattering.
- Your items will never despawn.
- 100% of your experience will drop
Additonally...
- This mod uses dynamic predicates to decide whether an item should be dropped or not, meaning that it is automatically compatable with most modded tools and weapons.
- Compatabile with most gravestone mods.
- Compatabile with Accessories.
- Compatabile with YYZ's Backpack and Sophisticated Backpacks (backpacks will drop on death to prevent circumventing KSMI)
- Fully configurable!
Configuring
This mod can be configured in the mod menu, as well as with datapacks.
Configuration properties
| Property | Description | Default |
|---|---|---|
| Mod enabled | Whether the mod is enabled. | true |
| Keep enchantable items | When true, enchantable items not in the always_drop tag will be kept in inventory. |
true |
| Keep damageable items | When true, items with the max_damage component not in the always_drop tag will be kept in inventory. |
true |
| Keep equippable items | When true, items that can be equipped as armor or as an accessory not in the always_drop tag will be kept in inventory. |
true |
| Item velocity multiplier | How much items should be flung when you die. 1 is vanilla's default. | 0.1 |
| Experience dropped | Percent of experience should be dropped when you die. Set to 0 to use Minecraft's calculations. | 1.0 |
| Despawn time | Time in minutes that items dropped on death should last. Set to 0 to make them never despawn. | 0 |
Datapack configuration
Datapacks can be used to have full control over what items drop on death. KSMI
provides two item tags: #keepsomemoddedinventory:never_drop and #keepsomemoddedinventory:always_drop. These tags take precidence over the predicates in the config. By default, tool items like the spyglass or compass are in the #never_drop tag and container items like the shulker box are in the #always_drop tag.
How to Install Keep Some Modded Inventory (Mod)
Keep Some Modded Inventory by mageowl is verified for Neoforge across Minecraft versions 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5 (latest release: 1.6, file size: 24 KB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5) and platform (Neoforge).
- Make sure you have the compatible loader or environment installed for Neoforge.
- Move the downloaded Keep Some Modded Inventory file into your Minecraft
.minecraft/modsfolder and launch the game.
All Versions
+ Add Version- Added filled maps to the
never_drop.jsontag - Added compatability with Map Atlases (atlases do not drop)
Additionally: the mod's source is now hosted on [Codeberg](https://codeberg.org/mageowl/keep-some-modded-inventory).
- Fixed items disappearing on death
- This version has a critical bug. Please use 1.5 instead.**
- Fix
always_drop.jsonreferencing a non-existent tag. (Thanks to @Rabenwacht for finding and reporting this bug!) - Add built-in compatability rules with YYZ's Backpack and Occultism.
- Fix Accessories items from being destroyed on death instead of dropped.
- Added Shulker boxes and Backpacks from Sophisticated Backpacks to the
always_droptag. This is to combat people from storing their precious resources in container items that get picked up by the equippable config rule (some mods make shulkers equippable). - Added a config option for item despawn time. This does not affect items dropped from something other than a player dying.
- Reverted the event priority to
LOW. This should hopefully fix some compatability issues. - [@itsaerosphere](https://github.com/itsaerosphere) added compatability with older Accessories beta versions.
- Upgraded Accessories support to be more direct
- Added tags for Create: Aeronautics and Pastel
- Rewrote the mod to use data attachments instead of saved data.