Preventing item loss after death [duplicate]

I'm really sick of getting all of my items destroyed when I die.

Is there any way, even by cheating, to re-acquire the items or to disable the 5 minute item-disappearance countdown?


Solution 1:

Risugami's has made a mod that will take items in your inventory and put them in a chest upon death.

When you die, if you have a chest in your inventory, it will be placed where you die, or in the closest available spot. The chest will be filled with as many items as possible. Items stored in the crafting slot are still lost, as usual, and any excess that won't fit in the chest will be dropped.

Here is the link on the Minecraft forums and here is a direct download.

Solution 2:

If you have cheats enabled, you can use /gamerule keepInventory true to avoid losing items on death. This will cause the items to stay in your inventory on death.