Keep Inventory
Keep Inventory 是适用于 Minecraft 26.3 的数据包。当你死亡时,你的工具、武器和护甲会保留在你身上。其他所有物品(方块、矿石、食物、药水、书、末影珍珠)都会掉落在你死亡的位置,这样你仍然有理由跑回去拾取它们。你的经验等级也会保留。

变更内容
- 保留给你: 剑、斧头、镐、铲、锄、所有护甲、战锤、三叉戟、弓、弩、盾牌、鞘翅、不死图腾、钓鱼竿、剪刀、燧石与钢、毛刷、望远镜、指南针、回溯之途指南针、时钟、胡萝卜竿和诡异菌竿。附魔和耐久度保持原样。
- 掉落在死亡地点: 其余所有物品及其附魔和自定义名称,均掉落在你死亡的维度中(已在主世界和下界测试)。
- 经验值: 你将保留自己的经验等级。
- 其他一切不变:没有新增物品,没有新增方块,无需学习新命令。
自定义保留物品
你保留的物品列表由一个物品标签 keep_inventory:keep 定义(位于文件 data/keep_inventory/tags/item/keep.json 中)。添加物品 ID 或标签以保留更多物品,或通过你自己的数据包覆盖该标签以减少保留的物品。
兼容性
- Minecraft:Java Edition 26.3。已在游戏内 26.3 版本中测试;其他版本尚未测试。
- 支持单人模式(将其添加到世界的数据包文件夹或创建世界界面),也适用于服务器(放入世界的
datapacks 文件夹)。无需任何模组。
- 加载时,此数据包会将游戏规则
keep_inventory 开启。关闭此数据包不会自动将规则改回;如需恢复原版死亡掉落效果,请运行 /gamerule keep_inventory false。
常见问题
这和 keepInventory 游戏规则一样吗? 该游戏规则会保留所有物品。而此资源包仅保留你的装备,其余物品掉落。
如果我在远处或另一个维度死亡,会丢失物品吗? 物品会在你死亡的地点掉落。如果在你重生时该区域未被加载,资源包会先短暂加载该区域。如果无法及时加载,物品将在你重生处掉落,而不是消失。
我能保留经验值吗? 可以,你的等级会保留。
我还能保留食物或方块吗? 可以:将它们添加到 keep_inventory:keep 物品标签中。
它是否兼容其他数据包和模组? 它仅使用原版命令和一个物品标签。已添加模组的物品不会保留在保留列表中,因此除非你将它们添加到该标签中,否则掉落物会正常生成。
之后可以移除吗? 可以。禁用资源包并使用 /gamerule keep_inventory false 将游戏规则重置为 false 即可。
安装
- 下载文件。不要解压它。
- 单人游戏:在创建世界时,打开 更多 → 数据包 并添加该文件。对于已有的世界,将其放入世界文件夹的
datapacks 文件夹中(路径为 saves/<你的世界>/datapacks)。
- 服务器:将其放入
<world>/datapacks,然后运行 /reload 或重启服务器。
- 使用
/datapack list 检查 Keep Inventory(保留物品栏)是否已启用。
更多来自 Tweakwell 的作品
小巧的单一用途资源包,每个仅改变一项内容,其余保持原版:
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
- Download the file. Do not unzip it.
- 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).
- Servers: put it into
<world>/datapacks, then run /reload or restart.
- 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)
评论 0
登录后参与评分
还没有评论,来抢沙发吧