Keep But Penalty
保留物品,但需承担死亡惩罚。
Keep But Penalty 会在玩家死亡时保留其物品栏(不更改世界的 keepInventory 游戏内规则),并通过可配置的经验值损失、装备耐久损耗、饥饿值保留以及可选的重生减益效果,取代令人沮丧的物品回收跑图。

死亡时的机制
- 保留装备,保持世界规则不变:玩家在死亡时会保留物品栏、盔甲、副手物品以及 Curios/Trinkets 饰品,同时你的世界中的
keepInventory游戏内规则保持不变。 - 可配置的经验值损失:保留总经验值的一定百分比(默认保留
75%,损失25%)。重生后会重新计算经验值,且不会触发经验球的声音或 Mending(修补)附魔的修复效果。 - 装备耐久损耗:从已装备的盔甲、手持物品、可选的 Curios、Trinkets 或 Accessories 槽位中扣除最大耐久的一定百分比(默认
10%)或固定数值。此外,还提供了可选开关来控制是否对快捷栏中的物品(damageHotbar = false)和主物品栏中的物品(damageInventory = false)造成耐久损耗。- 默认情况下不会导致装备破碎:当
allowBreak = false(默认值)时,死亡造成的耐久损耗最低会停在1点,确保惩罚不会直接销毁物品。如果你选择启用allowBreak = true,则当物品耐久降至0时会正常损坏(并尊重如 Keep My Sword 等防破碎模组)。原版鞘翅始终会停留在耐久为1的破损翅膀状态。 - 物品与标签排除:可通过
excludedItems跳过特定物品或标签(使用#keep_but_penalty:excluded,Tinkers' Construct、Tetra 和 SlashBlade 的工具默认被排除在外)。
- 默认情况下不会导致装备破碎:当
- 无需因饥饿而反复死亡:在死亡前后保留未满的饥饿值,并设置可配置的最低阈值(
minRespawnFoodLevel = 6,即 3 个鸡腿),从而防止出现免费的饥饿重置和无尽的饥饿循环。 - 可选的重生减益效果与动作栏摘要:应用随连续死亡次数增加的负面状态效果,并在动作栏显示简要摘要,告知你此次死亡的代价。

配置
通过 Mod Menu(Fabric)或 Mods → Config 界面(Forge / NeoForge)在游戏内进行编辑,或直接编辑 config/keep_but_penalty.toml:
[death]
keepInventory = true
enableExperiencePenalty = true
experienceKeepRatio = 0.75
preserveHungerOnDeath = true
minRespawnFoodLevel = 6
skipOnPvp = false
respawnDebuffs = []
respawnDebuffDurationsSecondsByDeath = []
respawnDebuffStreakResetSeconds = 600
showRespawnSummary = true
[durability]
enableDurabilityPenalty = true
penaltyMode = "PERCENT_MAX"
durabilityPercent = 0.1
durabilityFlat = 80
allowBreak = false
damageArmor = true
damageMainHand = true
damageOffHand = true
damageHotbar = false
damageInventory = false
damageCurios = true
damageTrinkets = true
damageAccessories = true
excludedItems = ["#keep_but_penalty:excluded", "#tconstruct:modifiable", "#tetra:modular_items", "#slashblade:swords"]
Keep But Penalty
Keep your items when you die without making death free.
Keep But Penalty preserves player inventories on death (without changing your world's keepInventory gamerule) and replaces frustrating item-recovery runs with configurable experience loss, gear durability wear, hunger preservation, and optional respawn debuffs.

What Happens on Death
- Keep your gear, leave world gamerules intact: Players keep their inventory, armor, offhand, and curios/trinkets on death while your world's
keepInventorygamerule stays untouched. - Configurable XP loss: Keep a set percentage of total experience (default
75%, losing25%). Experience is recalculated cleanly on respawn without triggering XP orb sounds or Mending repairs. - Equipment durability wear: Deducts a percentage of max durability (default
10%) or a flat amount from equipped armor, held items, optional Curios, Trinkets, or Accessories slots, plus optional toggles for damageable items in your hotbar (damageHotbar = false) and main inventory (damageInventory = false).- Won't shatter your gear by default: With
allowBreak = false(default), death wear stops at1durability so penalties never destroy an item outright. If you opt intoallowBreak = true, items reaching0break normally (and respect anti-break mods like Keep My Sword). Vanilla Elytra always stops at its1-durability broken-wing state. - Item & tag exclusions: Skip specific items or tags via
excludedItems(#keep_but_penalty:excluded, Tinkers' Construct, Tetra, and SlashBlade tools are excluded by default).
- Won't shatter your gear by default: With
- No dying to refill hunger: Preserves below-full hunger across death with a configurable floor (
minRespawnFoodLevel = 6, 3 drumsticks), preventing both free hunger resets and endless starvation loops. - Optional respawn debuffs & actionbar summary: Apply status effects that scale up on consecutive deaths, and show a brief actionbar summary of what the death cost you.

Configuration
Edit in-game via Mod Menu (Fabric) or the Mods → Config screen (Forge / NeoForge), or edit config/keep_but_penalty.toml:
[death]
keepInventory = true
enableExperiencePenalty = true
experienceKeepRatio = 0.75
preserveHungerOnDeath = true
minRespawnFoodLevel = 6
skipOnPvp = false
respawnDebuffs = []
respawnDebuffDurationsSecondsByDeath = []
respawnDebuffStreakResetSeconds = 600
showRespawnSummary = true
[durability]
enableDurabilityPenalty = true
penaltyMode = "PERCENT_MAX"
durabilityPercent = 0.1
durabilityFlat = 80
allowBreak = false
damageArmor = true
damageMainHand = true
damageOffHand = true
damageHotbar = false
damageInventory = false
damageCurios = true
damageTrinkets = true
damageAccessories = true
excludedItems = ["#keep_but_penalty:excluded", "#tconstruct:modifiable", "#tetra:modular_items", "#slashblade:swords"]
下载 Keep But Penalty
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Keep But Penalty
下载 Keep But Penalty
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Keep But Penalty
下载 Keep But Penalty
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Keep But Penalty
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Keep But Penalty
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Keep But Penalty
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Keep But Penalty
下载 Keep But Penalty
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
- 将物品栏耐久度惩罚拆分为
[durability]下的两个独立选项:damageHotbar(快捷栏槽位0–8)和damageInventory(主物品栏槽位9–35,不含快捷栏),默认均为禁用状态(false)。 - 在所有版本(
1.20.1、1.21.1、26.x)中添加了独立的内置游戏配置界面开关及四种语言翻译(en_us、zh_cn、zh_tw、ja_jp),并通过IdentityHashMap去重机制确保当前主手物品不会受到两次惩罚。
- 新增了对 Fabric 和 NeoForge 的 Minecraft 26.3 支持。
- 修复了在 Minecraft 1.20.1 Forge 上缺少
pack.mcmeta(ResourcePackInfo启动警告)的问题。
2.0.2
修复
- 专用服务器隔离:将仅客户端的配置屏幕注册和客户端生命周期类移至专用的客户端包(
KeepButPenaltyForgeClient、KeepButPenaltyNeoForgeClient、KeepButPenaltyModMenu),以确保专用服务器永远不会加载客户端 GUI 类。 - 验证:在 8 目标构建矩阵、JUnit/属性测试、打包 JAR 架构契约以及真实的 Minecraft 1.21.1 NeoForge GameTest 端到端测试中进行了验证。
Legacy 1.1.2 alpha build 保留用于历史兼容性。
[2.0.1] - 2026-11-20
已更改
allowBreak的默认值更安全:将durability.allowBreak的默认值从true改为false,这样物品在默认情况下至少会保留 1 点耐久度,而不会在死亡时直接损坏。设置allowBreak = true仍会调用原版标准的ItemStack.hurtAndBreak(...)(或交由防破坏模组处理)。
发布当前受证明保护的运行时源。所有定义的单元/属性/模型契约均已通过,且独立最终 JAR 门控验证也已完成。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧