contribute

toolbox

tags

Summary

This mod protects your items from despawning when you die by storing them on a dead body that you can later loot to get your stuff back. Your dead body is unharmed by fire, explosions, and falling, with configurations options to make your lootable bodies completely invulnerable (or more vulnerable, if you so choose). Simply right-click on a dead body to access its inventory. Use a shovel to dispose of your body after you looted it (3 hits with a shovel will remove the body).

Save Your Inventory When You Die

When you die, this mod spawns a corpse (with your player skin, unless fancy corpses are disabled) and puts all of your inventory on the corpse. Damageable items suffer some damage (configurable), bit will never be destroyed. Even near-by items on the ground are sucked into your corpse, so that even items in extra inventories provided by other mods will also be saved on your corpse.

In the following sequence of images, my character gets killed by a Creeper and then loots his own dead body to get his stuff back.

Your lootable body is fire-proof, explosion-proof, and fall-proof by default.

Disposing Bodies

Hitting a body 3 times with a shovel will dispose it, dropping any equipment it has still on it. Damaging the body with other damage sources will also destroy it if that damage type is enabled by the config options (see Configuration Options below).

Configuration Options

corpse_HP This is the number of half-hearts of damage that needs to be dealt to the body to destroy it. If no damage vulnerabilities are specified, then only a shovel can destroy a body (and it only takes 3 hits from the shovel, no matter how many HP it the body has). Default is 50 (25 hearts).add_bones_to_corpse If set to true, then bones and rotten flesh will be added to your corpse inventory when you die. Default is true.corpse_inventory_size This is the total number of items that the corpse can hold. Only 54 items are visible at a time (the rest will appear in the inventory window as soon as there's space). Default is 108 items and the lowest allowed value is 54 (which is the number of items visible in the GUI).use_player_skin If true, dead bodies use the skins of their former selves. If false, dead bodies are skeletons.item_damage_on_death Damage suffered by damageable items on death (you didn't think that death was a free-ride, did you?). This item damage will never destroy an item, leaving it with 1 durability instead. You can set this value to 0 if you don't want item damage on death, default is 32 durability damage.enable_corpse_decay If true, corpses will self-destruct after a preiod of time (default: false). See also corpse_decay_time.corpse_decay_time If enable_corpse_decay=true, then this is the age at which a dead body will self-destruct, dropping its items. The format is hours:minutes:seconds or just hours:minutes. For example: 0:05 is five minutes and 48:00:10 is two days and ten seconds. Default is 1:00:00 (1 hour).empty_only_decay If true and corpse decay is enabled, then corpses only decay when they have no items on them.hurt_by_weapons If true, bodies can be damaged by attacking it (default: false).hurt_by_fire If true, bodies will be damaged by fire and lava (default: false).hurt_by_fall If true, bodies will be damaged by falling long distances (default: false).hurt_by_explosions If true, bodies will be damaged by creepers and TNT (default: false). Note that if you disable explosion damage but enable fall damage, then explosions will eventually destroy a body by throwing it into the air and hurting it with fall damage.hurt_by_cactus If true, bodies will be damaged by cacti (default: false).hurt_by_block_suffocation If true, bodies will be damaged by being stuck inside a block (default: false).hurt_by_other If true, bodies will be damaged by damage sources not covered by the other options (default: false).hurt_by_all If true, bodies will be damaged by anything that damages a player (default: false).

Creating Lootable Bodies with the Summon Command

In the simplest case, you can simply summon a default corpse with the Steve skin with:

/summon lootablebodies_EntityLootableBody

To summon a Lootable Body with a specific orientation and player skin, the cammond would look like this:

Where Yaw is a value from 0 to 360 specifying the angle or rotation (0 points north, 90 points west, 180 points south, and so on) and PlayerName is the user name of the player whose skin you want to use. Note that you may need to log-out and back in to see the appropriate player skin if you summon a corpse using the skin of a player that is not logged on to your server at that moment.

Known Issues

The Slime Dungeons mod sometimes conflicts with this mod, causing a crash related to assigning the same entity ID multiple times. Unfortunately, there is nothing I can to Lootable Bodies to prevent this conflict, so if it happens to you, you must either remove Slime Dungeons or Lootable Bodies.

The dead body model in Lootable Bodies is not the same model as the player, so mods that change the appearance of players will not apply the same change to your dead body.

F.A.Q

Q: Why can't I have player skins on corpses in Minecraft 1.7.10? A: Grabbing player skins on demand is a new feature in Minecraft 1.8. I don't have the time nor the interest in reimplementing Minecraft 1.8 in Minecraft 1.7.10.

Q: Can I use this mod in my public mod pack?
A: Yes you can. You do not need my written permission, though I would appreciate it if you could post a link to your mod pack on this thread so I can check it out for myself.

Q: When I die holding an item from mod , the game glitches/crashes/changes the item into something else! How do I fix that?
A: Set item_damage_on_death=0 in the config file and see if that fixes the problem. If not, send me you crash report. The problem here is that some mods use the damage value of an item for metadata but still report the item to be damageable when Lootable Bodies tries to figure out whether the item should receive item damage.

Q: Could you please port this mod to Minecraft 1.7.2/1.6.4/1.5.2/etc.?
A: No way! Just backporting to 1.7.10 added an addtional 200 lines of rendering code. Minecraft 1.8 is so much easier. Going back even further would be unbearably painful. However, there's nothing stopping you from forking my GitHub project and making your own backport.