
KeepBedInventory
This modification completely changes the mechanics of saving inventory and experience upon player death. Instead of standard rules, it offers a more balanced approach.
Item Preservation
When setting a respawn point via bed, respawn anchor, or other methods, all items in the inventory and the player's current experience level are saved with a timestamp.
Upon death, the player will only keep items that were in their possession at the time of the last respawn point setting and remain in the inventory. All other items will drop normally.
Important features:
- Only items with the current timestamp are preserved
- If an item has a different timestamp, it will be lost
- Items not on the player at the time of death are not saved
Experience System
Upon death, the player keeps either the experience level at the time of setting the respawn point or the current level — whichever is lower.
Example 1: Player saved with 30 levels, collected 5 more and died — will keep 30 levels, losing experience equivalent to 5 levels.
Example 2: Player saved with 30 levels, spent 5 on enchanting and died — will keep 25 levels without losses.
Important Notes
- The mod doesn't work if the keepInventory rule is active
- If the respawn point is invalid at the time of death, all items drop in the standard way