Partial Keep Inventory
Partial Keep Inventory 为 Fabric 1.21.1 提供了一个比 /gamerule keepInventory 更柔和的替代方案。它不会保留所有物品或掉落所有物品,而是有选择地保护贵重物品,同时依然对死亡施加惩罚。
核心功能
选择性保留物品
保留所有的潜影盒(任意颜色)。
保留所有不可堆叠的物品——工具、武器、盔甲、鞘翅等(任何最大堆叠数为 1 的物品)。
保留额外的容器类物品,如末影箱和聚珍包(以及你在 partialkeepinv.json 白名单中添加的任何其他物品)。
所有其他物品(方块、食物、可堆叠物品)在死亡时正常掉落。
保留物品的背包位置
保留的物品会被恢复到其原始的背包槽位(快捷栏和主背包)。
副手物品在可能时会恢复到副手槽位。
如果某个槽位已被占用,该物品会被添加到背包中;如果没有空间,则会掉落在玩家脚下。
盔甲处理
盔甲会被保留并在重生时自动装备。
每次死亡会对每件穿着的盔甲造成额外的耐久度伤害(默认为最大耐久度的约 3%,可配置)。
物品不会因为死亡惩罚而被销毁——始终至少保留 1 点耐久度。
经验值惩罚
每次死亡时,玩家会损失一定数量的经验等级(默认为 1–5 级,永远不会低于 0 级)。
不会掉落经验球。
配置
keep.shulkers, keep.nonStackableItems, keep.containers – 切换受保护的物品类型。
containers.materialWhitelist – 列出总是保留的额外物品(默认:minecraft:ender_chest, minecraft:bundle)。
xpLoss.enabled, xpLoss.minLevels, xpLoss.maxLevels – 控制死亡时损失的等级数量。
armorDamage.enabled, armorDamage.percent – 控制每次死亡时盔甲耐久度的损失。
要求
Fabric Loader 0.18+
Fabric API
Java 21+
确保在每个相关世界中执行:
/gamerule keepInventory false
Partial Keep Inventory
Partial Keep Inventory introduces a softer alternative to /gamerule keepInventory for Fabric 1.21.1. Instead of keeping everything or dropping everything, it selectively protects valuable items while still punishing deaths.
Core Features
Selective item keeping
Keeps all shulker boxes (any colour).
Keeps all non-stackable items – tools, weapons, armour, elytra, etc. (anything with max stack size 1).
Keeps extra container-like items such as ender chests and bundles (and anything else you add to the whitelist in partialkeepinv.json).
All other items (blocks, food, stackables) drop normally on death.
Inventory position preserved
Kept items are restored to their original inventory slots (hotbar and main inventory).
Off-hand item is restored to the off-hand slot when possible.
If a slot is already occupied, the item is added to the inventory or dropped at the player's feet if there's no space.
Armour handling
Armour is kept and re-equipped automatically on respawn.
Each death applies extra durability damage to each worn armour piece (default ~3% of max durability, configurable).
Items won't be destroyed by the death penalty — at least 1 durability is always preserved.
XP penalty
On every death the player loses a configurable number of XP levels (default 1–5, never below level 0).
No XP orbs are dropped.
Configuration
keep.shulkers, keep.nonStackableItems, keep.containers – toggle what types of items are protected.
containers.materialWhitelist – list extra items to always keep (default: minecraft:ender_chest, minecraft:bundle).
xpLoss.enabled, xpLoss.minLevels, xpLoss.maxLevels – control how many levels are lost on death.
armorDamage.enabled, armorDamage.percent – control armour durability loss per death.
Requirements
Fabric Loader 0.18+
Fabric API
Java 21+
Make sure in each relevant world:
/gamerule keepInventory false
评论 0
登录后参与评分
还没有评论,来抢沙发吧