Keep Inventory

Keep inventory data pack: tools and armor stay on death, other items drop.
item image

Description

Keep Inventory

Keep Inventory is a data pack for Minecraft 26.3. When you die, your tools, weapons and armor stay with you. Everything else (blocks, ores, food, potions, books, ender pearls) drops where you died, so you still have a reason to run back for it. Your experience levels stay too.

What changes

  • Stays with you: swords, axes, pickaxes, shovels, hoes, all armor, mace, trident, bow, crossbow, shield, elytra, totem of undying, fishing rod, shears, flint and steel, brush, spyglass, compass, recovery compass, clock, carrot on a stick and warped fungus on a stick. Enchantments and damage stay as they were.
  • Drops at your death spot: every other item, with its enchantments and custom names, in the dimension where you died (tested in the Overworld and the Nether).
  • Experience: you keep your levels.
  • Nothing else changes: no new items, no new blocks, no commands to learn.

Change what you keep

The list of items you keep is one item tag, keep_inventory:keep (in the file data/keep_inventory/tags/item/keep.json). Add item IDs or tags to keep more, or override the tag with your own data pack to keep less.

Compatibility

  • Minecraft: Java Edition 26.3. Tested in game on 26.3; other versions are not tested yet.
  • Works in singleplayer (add it to your world's datapacks folder or the create-world screen) and on servers (put it in the world's datapacks folder). No mods needed.
  • When it loads, the pack switches the game rule keep_inventory on. Turning the pack off does not switch the rule back; run /gamerule keep_inventory false for vanilla death drops again.

FAQ

Is this the same as the keepInventory game rule? The game rule keeps everything. This pack keeps only your gear and drops the rest.

Do I lose items if I die far away or in another dimension? The items drop at the spot where you died. If that area is no longer loaded when you respawn, the pack loads it for a moment first. If it cannot load it in time, the items drop where you respawn instead of vanishing.

Do I keep my experience? Yes, your levels stay.

Can I keep food or blocks too? Yes: add them to the keep_inventory:keep item tag.

Does it work with other data packs and mods? It only uses vanilla commands and one item tag. Modded items are not on the keep list, so they drop unless you add them to the tag.

Can I remove it later? Yes. Disable the pack and set the game rule back with /gamerule keep_inventory false.

Installation

  1. Download the file. Do not unzip it.
  2. Singleplayer: when creating a world, open More → Data Packs and add the file. For an existing world, put it into the world folder's datapacks folder (saves/<your world>/datapacks).
  3. Servers: put it into <world>/datapacks, then run /reload or restart.
  4. Check with /datapack list that Keep Inventory is enabled.

More by Tweakwell

Small, single-purpose packs that each change one thing and keep everything else vanilla:

  • No Fog: removes the distance fog
  • Fullbright: full brightness everywhere
  • True Darkness: caves and moonless nights go truly dark
  • Flashlight: a flashlight for dark nights and caves (Iris shader)
  • Motion Blur: camera motion blur when you turn fast (Iris shader)

Keep Inventory Team

profile avatar
  • 4
    Projects
  • 39
    Downloads

More from user_a5ushv1fy497j2eu