A kind of partial KeepInventory based on spawn points.
When you set your spawn, your inventory and XP will be saved at that instant. When you die, only the items and XP you had for that save will be restored. All your other items will drop at your death location.
For example, if you set your spawn before looting a structure and then die, you will keep the equipment you had before going into the structure, but the loot you collected while inside will drop.
Works with beds and respawn anchors, and should work with most modded respawn systems
You may click the respawn point again to save your inventory again
Partial stacks are preserved, so if you save with 10 diamonds, collect 10 more diamonds, and then die, you will keep 10 diamonds and drop 10 diamonds
Contents of bundles & shulker boxes are handled, for example if you save your inventory then put some items inside a bundle then die, you should keep all your items
Items are still restored even if inventory items are moved around, although in a partial restore scenario the order may affect how stacks are split
When comparing items, any components in #savepoint:restore_ignored are ignored. By default, this includes:
Feel free to open an issue with suggestions for more ignored components

A partial keep inventory: Spawn points save your current items and restore them upon death