Peak Stamina
将原版冲刺机制替换为基于疲劳和饥饿的资源管理系统。支持 Tough as Nails、Cold Sweat、ParCool 和 Combat roll 的兼容。如需额外的自定义惩罚或集成,请参阅下方的“高级功能”部分。仅兼容 ParCool 3.4.3.3。
功能
- 动作消耗:冲刺、跳跃、攻击、挖掘、游泳、攀爬和使用物品时会消耗耐力。
- 疲劳:当耐力低于 25% 并持续保持在此水平时,会累积 疲劳,从而暂时降低最大耐力上限。
- 食物中毒:食用变质食物会施加持续的 中毒 惩罚(紫色条),在消退前会占用一部分最大耐力。
- 负重系统:携带重物会降低最大耐力。携带越重,惩罚越大。
- 攀爬:梯子会消耗耐力。按住 Shift 键可启用慢速攀爬(速度为 40%),此模式下不消耗耐力并允许逐步恢复。
- 饥饿惩罚:低食物等级会降低最大耐力上限。
- HUD:自定义的低轮廓耐力条,带有疲劳、中毒、负重和活跃状态的视觉指示器。
BAR 模式

ICON 模式

配置文件
-
config/peak_stamina/common.toml:所有核心游戏数值(消耗、恢复、惩罚)。
-
config/peak_stamina/lists.toml:负重系统、物品消耗、消耗品、通用惩罚/增益以及 exhaustion 配置。
-
config/peak_stamina/client.toml:HUD 和视觉设置。
-
注意:随着 v2.0.0 版本的更新,现在游戏中有了配置界面!你可以在画廊中查看其外观。从 v2.2.0 版本开始,我将不再更新描述文本,虽然你仍能在下方描述中看到一些旧版功能,但会缺失大量内容。
基础设置
常规
enableStamina (默认值: true): 模组的主开关。
disableInCreative (默认值: true): 如果为 true,创造模式玩家将被完全排除在耐力系统之外。
disableInSpectator (默认值: true): 如果为 true,旁观者模式玩家将被完全排除在耐力系统之外。
initialMaxStamina (默认值: 100.0): 所有玩家的初始最大耐力。所有惩罚和修饰符都基于此基准值计算。
slowClimbSpeed (默认值: 0.4): 慢速攀爬时的移动速度乘数(设为 1 以禁用)
动作消耗
将任何值设置为 0 以禁用它。使用负值可在执行该动作时恢复耐力而非消耗。
depletionSprint (默认值: 0.15): 奔跑时每刻度的消耗量。
depletionJump (默认值: 0.85): 跳跃时的瞬间消耗量。
depletionAttack (默认值: 3.45): 挥动武器时的瞬间消耗量。
depletionMissedAttack (默认值: 1.0): 挥空时的瞬间消耗量。
depletionBlockBreak (默认值: 1.1): 破坏方块时的瞬间消耗量。
depletionBlockPlace (默认值: 1.1): 放置方块时的瞬间消耗量。
depletionClimb (默认值: 0.7): 在梯子上时每刻度的消耗量。
depletionSwim (默认值: 0.05):在水中时每刻度的消耗量。
itemInterruptionCooldown (默认值: 120): 在使用物品耗尽耐力后,该物品变得不可用的刻度数。
恢复
recoveryPerTick (默认值: 0.36): 基础恢复速度。
recoveryRestMult (默认值: 1.45): 静止站立时应用的乘数。
recoveryClimbMult (默认值: 0.7): 在梯子上休息时应用的乘数。
recoveryDelay (默认值: 50): 执行动作后开始恢复前的刻度数。
附魔
这些值作为乘数使用。例如,0.15 表示减少 15%,而 0.60 表示减少 60%。
lightweightLvl1 (默认值: 0.25): 轻装 I 附魔的减重乘数。
lightweightLvl2 (默认值: 0.50): 轻装 II 附魔的减重乘数。
lightweightLvl3 (默认值: 0.75): 轻装 III 附魔的减重乘数。
tirelessLvl1 (默认值: 0.20): 不知疲倦 I 附魔的耐力消耗减少乘数。
tirelessLvl2 (默认值: 0.40): 不知疲倦 II 附魔的耐力消耗减少乘数。
tirelessLvl3 (默认值: 0.60): 不知疲倦 III 附魔的耐力消耗减少乘数。
惩罚与限制
fatigueThreshold (默认值: 0.25): 开始累积疲劳的耐力百分比。
fatigueDurationToPenalty (默认值: 180): 在危险区域停留达到多少刻度后激活疲劳惩罚。
maxExertionPenalty (默认值: 30.0): 因疲劳导致的最大耐力损失。
maxHungerPenalty (默认值: 30.0): 因饥饿导致的最大耐力损失。
hungerPenaltyThreshold (默认值: 6): 开始产生饥饿惩罚的食物等级(相当于 3 个鸡腿)。
minMaxStamina (默认值: 10.0): 最大耐力的硬性下限:它永远不会被降低到此值以下。
penaltyRecoveryDelay (默认值: 100): 条件改善后疲劳开始治愈前的刻度数。
penaltyBuildupRate (默认值: 0.1): 条件恶化时每刻度累积的惩罚量。
penaltyDecayRate (默认值: 0.05): 条件改善时每刻度恢复的惩罚量。
中级功能
睡眠机制
sleepMode (默认值:DEFAULT): 控制疲劳度随时间衰减的方式:
DEFAULT:疲劳度会随时间自然衰减。睡觉和食用可消除疲劳的食物均可减少疲劳度。
HARDCORE:疲劳度不会自行衰减。你 必须 睡觉或食用可消除疲劳的食物才能移除它。
sleepFatigueReduction (默认值:20.0): 成功睡眠后直接扣除的疲劳惩罚值。将其设置为较高的数值可以完全清除疲劳度。
注意: 只有标记为 CURE;FATIGUE;value 的食物才能治疗疲劳。单个物品上可以链接多个 CURE 条目:例如,CURE;FATIGUE;10;CURE;universalpenalty;10 可同时移除 10 点两种类型的惩罚。完整指南请参阅“消耗品”部分。
战斗与动态武器重量
重量缩放公式:
启用重量缩放后,攻击所消耗的耐力将乘以一个基于当前持有武器的计算重量系数。
Multiplier = 1.0 + (((WeaponWeight - Normalizer) / Normalizer) * ScaleFactor)
命中攻击设置:
depletionAttack (默认值:3.45): 每次成功攻击的基础耐力消耗量。
attackCostScalesWithWeight (默认值:true): 启用或禁用命中攻击的动态重量公式。
attackWeightNormalizer (默认值:3.0): 产生恰好 1.0x 耐力消耗倍率的基准武器重量。
attackWeightScaleFactor (默认值:1.0): 重量对攻击成本影响的强度。
attackWeightMinMultiplier (默认值:0.4): 耐力消耗倍率的绝对最小值。
attackWeightMaxMultiplier (默认值:5.0): 耐力消耗倍率的绝对最大值。
未命中攻击设置:
depletionMissedAttack (默认值:1.0): 挥空时的基础耐力消耗量。
missedAttackCostScalesWithWeight (默认值:true): 启用或禁用未命中攻击的动态重量公式。
missedAttackWeightNormalizer (默认值:3.0): 未命中攻击下产生 1.0x 倍率的基准武器重量。
missedAttackWeightScaleFactor (默认值:1.0): 重量对未命中攻击成本影响的强度。
missedAttackWeightMinMultiplier (默认值:0.4): 未命中攻击耐力消耗倍率的最小可能值。
missedAttackWeightMaxMultiplier (默认值:5.0): 未命中攻击耐力消耗倍率的最大可能值。
鞘翅机制
控制玩家飞行时耐力耗尽后的行为。
depletionElytra (默认值:0.25): 飞行时每刻(tick)的耐力消耗量。
disableElytraWhenExhausted (默认值:true): 如果为 true,当耐力归零时,鞘翅会发生气动失速。如果为 false,飞行将继续正常进行。
exhaustedElytraDrag (默认值:0.86): 失速期间每刻保留的水平速度比例。数值越低,减速越快。(0.9 表示每刻损失 10% 的速度。)
exhaustedElytraGravity (默认值:-0.025): 失速期间每刻额外施加的垂直重力。负值会将玩家向下拉扯。
exhaustedElytraMinSpeed (默认值:0.5): 低于此速度阈值时,鞘翅会被强制关闭并导致玩家掉落。
exhaustedElytraTickInterval (默认值:3): 阻力物理效果应用的频率(以刻为单位)。1 表示每刻都应用。
额外耐力
控制玩家如何获得额外耐力以及其随时间的衰减方式。
当额外耐力超过最大容量时,HUD 栏会在自身上方动态堆叠显示。每个溢出层级都会稍微加深阴影,并在栏左侧显示一个倍数标签(例如 2x、3x)。
enableExcessStaminaConversion (默认值:true): 如果为 true,通过消耗品恢复超过最大值的耐力时,溢出的部分将转换为额外耐力。
excessConversionRate (默认值:0.5): 转换溢出的百分比。0.5 代表 50%(例如:10 点溢出 → 5 点额外耐力)。
bonusStaminaDecayDelay (默认值:20): 在获得或使用额外耐力后,开始衰减前的等待刻数。(20 刻 = 1 秒。)
bonusDecayScalesWithAmount (默认值:true): 如果为 true,衰减值是当前额外耐力的百分比:拥有越多,燃烧越快。如果为 false,衰减值是固定数量。
bonusStaminaDecayRate (默认值:0.05): 每秒损失的额外耐力。启用缩放功能时,0.05 代表每秒 5%。
高级功能
高级配置位于 config/peak_stamina/lists.toml 中。
重量系统
追踪背包中物品的总重量,并在携带过重时施加耐力惩罚。惩罚在阈值和上限之间线性缩放。
enableWeightSystem (默认值:true): 启用或禁用重量计算。
weightPenaltyThreshold (默认值:125.0): 开始产生惩罚(0%)的总重量阈值。
weightPenaltyLimit (默认值:400.0): 达到最大惩罚(100%)的总重量上限。
maxWeightPenaltyAmount (默认值:40.0): 满载状态下的最大耐力削减量。
maxWeightRecursionDepth (默认值:3): 扫描嵌套容器的深度层级数。
autoWeightBase (默认值:10.0): 未明确列出的物品的基础重量。
重量计算方式
每个物品的重量由以下四个优先级层级之一决定(优先级最高者胜出):
- 显式物品重量:定义于
customItemWeights 中(支持标准 ID 和虚拟 NBT ID)。
- 标签重量:定义于
customTagWeights 中。
- 高级 NBT 提取:定义于
nbtWeightPaths 中(提取隐藏 ID 以对照显式重量)。
- 自动称重器:启发式回退方案:
Weight = (autoWeightBase / MaxStackSize) × Count。
当 autoWeightBase = 10.0 时,一把剑(一组)、16 颗末影珍珠和 64 个泥土块的总重量均为 10.0:携带更多可堆叠物品不会导致重量无限增加。容器(潜影盒、背包)会包含其内部物品的重量。Shulker Boxes、Curios 和 PackedUp 已支持自动检测。
显式物品权重
格式: "modid:item;weight":权重针对单个物品计算,而非按组计算。
注意:此列表也接受由高级 NBT 系统提取的“虚拟 ID”(例如 "tacz:9mm;0.05")。
customItemWeights = [
"minecraft:netherite_chestplate;15.0",
"minecraft:diamond_sword;4.0",
"minecraft:obsidian;1.2",
"tacz:9mm;0.05"
]
标签权重
格式: "tag;weight":权重应用于标签内的每个单独物品。
customTagWeights = [
"forge:ores;0.25",
"forge:storage_blocks;0.15",
"forge:ingots;0.2"
]
自定义容器路径
用于存储物品于自定义 NBT 中的背包模组。仅在模组未被自动检测时需要配置。
格式: "modid:item;path.to.list"
customContainerPaths = [
"somemod:satchel;Inventory",
"anothermod:backpack;StorageTag.Items"
]
高级 NBT 权重提取(适用于复杂模组)
何时使用:
Minecraft 中的大多数物品使用标准物品 ID(例如 minecraft:apple)。对于这些物品,你不需要此列表;只需将它们直接放入显式物品权重列表中即可。
然而,一些复杂的模组(如 TACZ)使用单一基础物品(例如 tacz:ammo),并将实际的具体物品 ID(如 tacz:9mm)隐藏在 NBT 数据中。此列表告诉权重系统在 NBT 数据的何处查找以找到真正的“虚拟 ID”。
ID 放置位置:
一旦在此处定义了路径,权重系统将提取隐藏的虚拟 ID。然后你必须将该提取出的 ID 放入你的 Explicit Item Weights 列表中以分配权重。
格式: "base_item_id ; nbt.path.to.id ; fallbackWeight ; applyFallbackIfMissing"
示例:
nbtWeightPaths = [
# 示例 1:弹药(回退标志使用 'true')
# 在 'tacz:ammo' 内查找 'AmmoId'。如果找到类似 'tacz:9mm' 的 ID,则检查显式权重。
# 如果未显式配置 'tacz:9mm',则添加 0.05 的重量。
# 如果完全缺少 AmmoId 标签,由于标志为 true,仍会添加 0.05 的重量。
"tacz:ammo;AmmoId;0.05;true",
# 示例 2:配件(回退标志使用 'false')
# 深入枪械的 NBT 文件夹(打开 AttachmentSCOPE,然后读取 tag 中的 AttachmentId)以检查是否有瞄准镜。
# 如果找到瞄准镜,则检查显式权重,否则添加 0.5 的重量。
# 如果没有装备瞄准镜(文件夹为空),由于标志为 false,则添加 0.0 的重量。
# (如果为 true,即使枪械没有安装瞄准镜,也会添加 0.5 的虚假重量。因此此处使用 false 更好)
"tacz:modern_kinetic_gun;AttachmentSCOPE.tag.AttachmentId;0.5;false"
]
负重上限属性
通过 /stamina attr weight_limit <value> 增加玩家的携带容量。每点增加 +0.5 到阈值,并增加 +1.0 到上限。
物品消耗成本
为任何物品分配耐力成本。多个成本类型可以叠加在单个物品上(例如,一个盾牌在持有时和格挡时都会消耗耐力)。
使用负的成本值可以在执行动作时恢复耐力,而不是消耗它。
itemInterruptionCooldown (默认值: 80): 在使用物品时耐力耗尽后的冷却时间(刻)。
enableAttackCooldownWhenExhausted (默认值: false): 与 itemInterruptionCooldown 不同,此项针对武器、剑、斧头等。
exhaustedAttackCooldownDuration (默认值: 80): 当耐力耗尽时挥舞武器的冷却持续时间。
格式: "ItemId;TYPE;Cost;TYPE;Cost..."
成本类型:
TICK: 在使用物品期间持续消耗耐力。如果耐力降至 0,则取消动作。
BLOCK: 仅当盾牌成功格挡伤害时才消耗耐力。支持动态缩放:BLOCK;BaseCost;DamageMultiplier。
USE: 右键点击时立即消耗耐力。
USE_ON_BLOCK: 仅当工具成功修改方块状态时才消耗耐力。
示例:
# 盾牌:持有时 `0.2/刻`;受到攻击时,固定 `2.0` + 传入伤害的 `80%`:
"minecraft:shield;TICK;0.2;BLOCK;2.0;0.8"
# 弓:拉弓时 `0.5/刻`:
"minecraft:bow;TICK;0.5"
# 钓鱼竿:抛竿时消耗 `3.0` 耐力:
"minecraft:fishing_rod;USE;3.0"
也可以使用基于标签的列表,格式相同,但使用标签 ID 而非物品 ID。特定物品条目的优先级始终高于标签条目。
消耗品系统
将多种效果链式应用到单个物品上,以创建复杂的食物和消耗品交互。
penaltyReliefDuration (默认值: 25): 食用缓解物品后 抗性 增益效果的持续时间(秒)。
maxPoisonPenalty (默认值: 40.0): 食物中毒最大阻止的耐力值。
poisonDecayDelay (默认值: 45): 食用后中毒惩罚开始恢复前的延迟时间(秒)。
poisonDecayRate (默认值: 0.05): 延迟过期后中毒条的衰减速度。
格式: "ItemId;TYPE;Args...;TYPE;Args..."
效果类型:
INSTANT;Amount: 立即恢复 Amount 点耐力。
BONUS;Amount: 授予 Amount 点额外耐力(金条)。在普通耐力耗尽前消耗,并随时间衰减。
POISON;Amount: 施加 Amount 点的食物中毒惩罚(紫色条)。在 poisonDecayDelay 秒后衰减。
REGEN;Amount;Seconds: 修改持续 Seconds 秒的回复速度。正数 = 更快,负数 = 更慢。(0.2 = +20%, -0.3 = -30%。)
PENALTY;Amount: 在 penaltyReliefDuration 秒内提供 抗性。公式:基础值 30% + (Amount / 100)。上限为 80%。
CURE;Target;Amount: 从特定惩罚中移除 Amount 点数值。有效目标:FATIGUE、HUNGER、POISON、WEIGHT、ALL,或任何自定义键(例如 temperature 或 modid:effectid)。
示例:
# 恢复 10.0 点耐力并授予 5.0 点额外耐力。
"minecraft:apple;INSTANT;10.0;BONUS;5.0"
# 在配置的缓解持续时间内容许约 50% 的惩罚获得抗性。
"minecraft:golden_carrot;PENALTY;20.0"
# 移除 100.0 点食物中毒。
"minecraft:milk_bucket;CURE;POISON;100.0"
# 移除 50.0 点中毒和 20.0 点疲劳。
"modid:herbal_tea;CURE;POISON;50.0;CURE;FATIGUE;20.0"
# 移除由凋零效果引起的 100.0 点惩罚。
"minecraft:honey_bottle;CURE;minecraft:wither;100.0"
# 移除所有活跃惩罚中的 50.0 点,并授予约 55% 的抗性。
"minecraft:golden_apple;CURE;ALL;50.0;PENALTY;25.0"
耗尽惩罚
定义玩家耐力降至 0 时发生的情况。
exhaustionCooldownDuration (默认值: 60): 耐力归零后惩罚持续的刻数(3 秒)。
exhaustedSpeedPenalty (默认值: -0.65): 耐力为 0 时冲刺的速度降低幅度。此时玩家将无法恢复耐力。
customExhaustionPenalties: 在耗尽时应用的属性修正器列表。
格式: "AttributeName;Amount;Operation"
运算操作:0 = 添加固定值,1 = 乘以基础值,2 = 乘以总值。
示例:使玩家减速 15%:
"minecraft:generic.movement_speed;-0.15;2"
通用惩罚(NBT 与状态效果)
通过比较器将任何模组的数据(口渴、温度、辐射、魔法等)链接到耐力系统。支持逐渐积累或即时应用。
universalPenalties: 定义外部惩罚的规则列表。
showIcons (默认值: true): 切换 HUD 上的惩罚图标显示。(位于 peak_stamina-client.toml。请查看您版本配置文件中的注释以确认可用性。)
格式: "Type;Key;Comparator;Threshold;WorstValue;MaxPenalty;ColorInt;IconText"
| 参数 |
描述 |
| Type |
NBT(检查玩家数据)或 EFFECT(检查药水增强/等级)。 |
| Key |
NBT 路径(例如 thirstLevel)或效果 ID(例如 minecraft:poison)。 |
| Comparator |
计算惩罚的逻辑。详见下方的比较器模式。 |
| Threshold |
开始产生惩罚的安全值(0%)。 |
| WorstValue |
在 SCALE 模式下:惩罚达到 100% 时的值。 在 MULTIPLIER 模式下:允许的最大总惩罚(硬性上限)。 |
| MaxPenalty |
在 SCALE 模式下:WorstValue 处的总惩罚量。 在 MULTIPLIER 模式下:每差 1 个单位产生的惩罚量。 |
| ColorInt |
HUD 覆盖层的十进制颜色代码(例如 16711680 为红色)。 |
| IconText |
在条上显示的 Emoji 或文本。写入 none 以禁用。 |
EFFECT 检查的是增强等级而非显示的等级。增强等级 0 = I 级。
比较器模式
| 运算符 |
行为 |
> |
当值高于 Threshold 时线性增加惩罚,在 WorstValue 处达到最大。 |
< |
当值低于 Threshold 时线性增加惩罚,在 WorstValue 处达到最大。 |
* |
Threshold 以上的每个点数增加 MaxPenalty,上限为 WorstValue。公式:(当前值 - Threshold) * MaxPenalty |
*< |
Threshold 以下的每个点数增加 MaxPenalty,上限为 WorstValue。公式:(Threshold - 当前值) * MaxPenalty |
在任何运算符前加 !(例如 !>、!*<)可即时应用惩罚,而不是逐渐积累。
第 8 个参数(IconText)设置条上显示的内容。直接输入任意字符或 Emoji(例如 ?、?),或使用 none 隐藏它。
示例
# 口渴等级低于 6 时线性增加惩罚
"NBT;thirstLevel;<;6;0;20.0;38143;?"
冷汗(热与冷):
# 极端高温(> 2)或极端低温(< 2)的线性惩罚
"NBT;targetTemperatureLevel;>;2;4;20.0;16724016;?"
"NBT;targetTemperatureLevel;<;2;0;20.0;65535;❄"
乘数(口渴):
# 低于 6 的每个点数增加 2.0 惩罚,上限为 30
"NBT;thirstLevel;*<;6;30;2.0;38143;?"
乘数(中毒效果):
# 每个增强等级增加 5.0 惩罚,上限为 50
"EFFECT;minecraft:poison;*;0;50;5.0;4488448;☣"
即时应用:
# 使用 ! 前缀即时应用惩罚
"EFFECT;hordes:infected;!*;0;80;10.0;8388736;?"
通用增益(NBT 与状态效果)
工作原理与通用惩罚相同,但授予额外耐力而非对玩家施加惩罚。
universalBuffs: 定义外部增益的规则列表。
universalBuffRegenWhileActive (默认值: false): 如果为 false,来自 PASSIVE/BOTH 模式的额外耐力会在玩家 actively 消耗耐力或处于回复冷却期间暂停回复。
格式: "类型;键;动作模式;阈值;上限或冷却时间;数量;爆发数量;缩放因子"
BurstAmount(爆发数量)仅适用于 BOTH 模式。ScalingFactor(缩放因子)仅适用于 MULTIPLIER 模式。
动作模式:
| 动作模式 |
行为 |
PASSIVE_OVER / PASSIVE_UNDER |
当属性高于/低于阈值时,每秒恢复额外耐力。 |
BURST_OVER / BURST_UNDER |
当属性跨越阈值时,立即给予一次性额外耐力。 |
BOTH_OVER / BOTH_UNDER |
在跨越阈值时给予一次性爆发效果,随后被动恢复直至达到硬上限。 |
在任何模式后附加 _MULTIPLIER(例如 PASSIVE_OVER_MULTIPLIER),可根据玩家超出阈值的程度来缩放效果。
LimitOrCooldown(上限或冷却时间)取决于上下文:对于 PASSIVE/BOTH 模式,它设置额外耐力的硬上限;对于 BURST 模式,它设置爆发触发前的冷却时间(以刻为单位)。
示例:
被动(再生效果):
# 激活时每秒生成 1.0,上限为 20.0
"EFFECT;minecraft:regeneration;PASSIVE_OVER;-1;20.0;1.0"
爆发 + 被动(NBT 法力值属性):
# 当法力值超过 50 时爆发 30.0,随后被动以每秒 2.0 的速度恢复,直到上限 100.0
"NBT;player_mana;BOTH_OVER;50;100.0;2.0;30.0"
乘数(力量效果):
# 力量 I (等级 0): 1.25x -> 每秒 2.5,上限 25.0
# 力量 II (等级 1): 1.50x -> 每秒 3.0,上限 30.0
"EFFECT;minecraft:strength;PASSIVE_OVER_MULTIPLIER;-1;20.0;2.0;1.25"
嵌套 NBT 路径
使用 . 在嵌套的 NBT 标签中进行导航,根据需要链接任意层级的路径:
# ForgeCaps 标签 → legendarysurvivaloverhaul:thirst 标签 → hydrationLevel 值
"ForgeCaps.legendarysurvivaloverhaul:thirst.hydrationLevel"
# ForgeCaps 标签 → legendarysurvivaloverhaul:temperature 标签 → temperature 值
"ForgeCaps.legendarysurvivaloverhaul:temperature.temperature"
# ForgeCaps 标签 → somemod:player_stats 标签 → skills 标签 → mining_level 值
"ForgeCaps.somemod:player_stats.skills.mining_level"
故障排除: 如果正确的路径仍然无效,请尝试在前面加上 ForgeCaps. 以及其余路径。例如:"NBT;ForgeCaps.legendarysurvivaloverhaul:temperature.temperature;*<;12;40;2.0;65535;❄"
⚠️ 实验性功能
这些功能处于实验阶段,可能会影响性能或游戏平衡。请谨慎使用。
实体耐力
将疲惫机制引入非玩家实体,允许怪物耗尽耐力并在战斗中遭受属性减益。
enableMobStamina (默认: false): 怪物耐力系统的总开关。
enableExhaustionParticles (默认: true): 切换怪物进入疲惫状态时的视觉“汗水”粒子效果。
疲惫配置文件
定义可复用的属性减益模板,可分配给任何怪物。完全支持模组添加的属性。
格式: "配置文件名;属性ID=倍率,属性ID=倍率..."
示例:
"MeleeTired;minecraft:generic.movement_speed=-0.40,minecraft:generic.attack_damage=-0.4"
"HeavyMelee;minecraft:generic.movement_speed=-0.60,minecraft:generic.attack_damage=-0.50"
自定义怪物耐力(白名单)
精确指定哪些怪物参与耐力系统。未列出的怪物完全不受影响。
注意: Boss 实体在此系统中的表现可能无法保证正常运作。
格式: "实体ID;最大攻击次数;疲惫持续时间(刻);配置文件名"
- EntityID: 怪物的注册表名称(例如
minecraft:zombie)。
- MaxAttacks: 触发疲惫之前的近战命中或远程射击次数。对于远程怪物,无论是否命中都计算发射的弹丸数量。
- ExhaustionTicks: 怪物保持疲惫状态的持续时间。(20 刻 = 1 秒。)
- ProfileName: 要应用的疲惫配置文件名称,如上定义。
使用弓或弩且其疲惫配置文件中包含攻击伤害降低效果的远程怪物,在疲惫状态下也会受到箭矢速度降低的影响。
自定义耐力动作
此系统允许您定义消耗或恢复耐力的特定触发器。每个动作遵循特定的字符串格式,由三个主要组件组成。
格式: "事件类型;参数;消耗量"
| 参数 |
描述 |
| Event_Type |
触发消耗的特定交互或事件类别(例如 MOUNT, HURT)。 |
| Argument |
过滤事件。使用特定 ID 针对单个对象,或使用 ANY 对该类别中的所有事件触发消耗。 |
| Cost |
消耗的耐力数量。 |
可用事件类型及参数
| 事件类型 |
参数 |
描述 |
MOUNT |
entity_id |
当玩家骑乘实体时触发(例如 minecraft:horse, minecraft:boat) |
INTERACT_ENTITY |
entity_id |
当右键点击实体时触发(例如 minecraft:villager, minecraft:pig)。 |
HURT |
damage_source |
当玩家受到伤害时触发(例如 fall, onFire, mob, arrow)。 |
FISH |
damage_source |
当玩家用鱼竿成功钓起物品时触发。 |
示例
"HURT;fall;10.0" 受到坠落伤害时损失 10 点耐力。
"MOUNT;minecraft:horse;25.0" 骑乘马匹的一次性消耗 25 点耐力。
"FISH;ANY;-5.0" 每次钓到鱼时恢复 5 点耐力。
"INTERACT_ENTITY;ANY;2.0" 与任何怪物互动时少量消耗耐力。
注意: 如果您希望耐力消耗适用于任何特定的实体或伤害源类型,请在参数中使用 ANY。负值表示恢复耐力。
ParCool 兼容
只要剩余耐力大于 0,您就可以发起 ParCool 动作:即使消耗量超过您当前拥有的数值。您的耐力只会降至 0。疾跑和快速游泳的消耗量是在基础疾跑和游泳消耗量之上叠加计算的。
使用负数的消耗值可以在执行动作时恢复耐力,而不是扣除耐力。
parCoolActionCosts:定义特定跑酷动作的耐力消耗列表。
格式: "动作名称;START;消耗;CONTINUE;消耗"
START:动作开始时的一次性消耗。
CONTINUE:动作持续期间每 tick 的消耗。
示例:
# Vault(跳越):瞬间消耗 8.0 耐力:
"Vault;START;8.0"
# Wall Run(蹬墙跑):启动消耗 15.0,随后每 tick 消耗 0.5:
"WallRun;START;15.0;CONTINUE;0.5"
Combat Roll Compat(战斗翻滚兼容)
只有当拥有足够的耐力以发起翻滚时,你才能进行翻滚。否则无法进行。
combatRollCost:每次翻滚消耗的耐力数值。
Auto HUD System(自动 HUD 系统)
所有视觉和 HUD 设置均位于 config/peak_stamina/client.toml 中。默认禁用。
autoHudMode:条状图的动画方式:FADE(淡入淡出)、SLIDE(滑动)或 BOTH(两者)。
autoHudSlideDir:滑动离开时的移动方向:UP、DOWN、LEFT、RIGHT。
autoHudEasing:动画曲线:LINEAR(线性)、SMOOTHSTEP(平滑阶跃)、EASE_OUT_SINE(正弦缓出)或 EASE_OUT_EXPO(指数缓出)。详细说明见配置文件注释。
autoHudFadeInSpeed / autoHudFadeOutSpeed:透明度过渡的独立速度控制。
autoHudSlideInSpeed / autoHudSlideOutSpeed:滑入滑出移动的独立速度控制。
autoHudSlideDistance:条状图滑出屏幕时移动的距离(像素)。
autoHudLingerTime:耐力停止变化后,条状图保持可见的时间(tick)。
autoHudThreshold:如果耐力降至此百分比以下,则自动显示条状图。
autoHudShowOnPenalties:只要存在任何活跃的负面效果(惩罚),强制保持条状图可见。
Custom Tooltips(自定义工具提示)
所有视觉和 HUD 设置均位于 config/peak_stamina/client.toml 中。
此系统允许你定义游戏中物品工具提示上显示哪些与耐力相关的统计数据。
enableTooltips (默认: true): 切换以启用或禁用在物品工具提示上显示耐力信息。
advancedTooltipsOnly (默认: false): 如果为 true,仅在游戏中激活 F3+H(高级工具提示)时才会显示耐力工具提示。
格式: "内容类型;位置;标签颜色;数值颜色"
| 参数 |
描述 |
| Content_Type |
要显示的具体耐力属性或效果(例如 WEIGHT、INSTANT_STAMINA)。 |
| Placement |
工具提示出现的位置:BOTTOM(工具提示末尾)或 BELOW_NAME(紧贴在物品名称下方)。 |
| Label_Color |
属性名称的颜色(例如 “Weight:”)。参见下方的颜色列表。 |
| Value_Color |
数值或效果的颜色(例如 “15.0”)。参见下方的颜色列表。 |
可用的内容类型
WEIGHT:显示物品的重量。
ATTACK_COST:显示成功挥击一次所消耗的耐力。
MISSED_ATTACK_COST:显示挥空时所消耗的耐力。
USE_COST:显示右键点击时的瞬间消耗。
TICK_COST:显示按住/使用时每 tick 的持续消耗。
BLOCK_COST:显示持盾格挡时所消耗的耐力。
INSTANT_STAMINA:显示食用后恢复的耐力量。
BONUS_STAMINA:显示提供的额外“Bonus Stamina”(奖励耐力)数量。
REGEN_MODIFIER:显示恢复速度的百分比加成或减益。
CURES:列出该物品可清除的负面效果(疲劳、中毒等)。
你也可以为每一项配置在工具提示中显示的内容。
颜色调色板
你可以对标签和数值使用以下标准 Minecraft 颜色名称:
BLACK, DARK_BLUE, DARK_GREEN, DARK_AQUA, DARK_RED, DARK_PURPLE, GOLD, GRAY, DARK_GRAY, BLUE, GREEN, AQUA, RED, LIGHT_PURPLE, YELLOW, WHITE.
示例
你列出这些条目的顺序决定了它们在工具提示中出现的顺序。
customTooltips = [
"WEIGHT;BOTTOM;DARK_GRAY;WHITE",
"ATTACK_COST;BOTTOM;DARK_GRAY;WHITE",
"INSTANT_STAMINA;BOTTOM;DARK_GRAY;GREEN",
"BONUS_STAMINA;BOTTOM;DARK_GRAY;GOLD",
"CURES;BOTTOM;DARK_GRAY;WHITE"
]
注意: 工具提示仅会出现在确实具有相应属性或效果的物品上。例如,除非明确配置,否则重量为 0 的物品不会显示 WEIGHT 工具提示。
Attributes & Commands(属性与命令)
Attributes(属性)
peak_stamina:max_stamina
peak_stamina:stamina_regen
peak_stamina:stamina_action_recovery # 乘以动作期间恢复的耐力
peak_stamina:regen_delay_multiplier
peak_stamina:exhaustion_duration_multiplier
peak_stamina:current_stamina
peak_stamina:penalty_gain_multiplier
peak_stamina:penalty_decay_multiplier
peak_stamina:max_global_penalty_multiplier
peak_stamina:max_fatigue_penalty_multiplier
peak_stamina:max_hunger_penalty_multiplier
peak_stamina:max_poison_penalty_multiplier
peak_stamina:max_weight_penalty_multiplier
peak_stamina:slow_climb_speed
peak_stamina:exhausted_sprint_speed
peak_stamina:weight_limit
peak_stamina:current_weight
peak_stamina:weight_calculation_multiplier # 乘以所有物品的重量
peak_stamina:global_stamina_usage
peak_stamina:jump_cost_multiplier
peak_stamina:sprint_cost_multiplier
peak_stamina:attack_cost_multiplier
peak_stamina:missed_attack_cost_multiplier
peak_stamina:shield_block_cost_multiplier
peak_stamina:shieldexp_parry_cost_multiplier
peak_stamina:item_cost_multiplier
peak_stamina:block_break_cost_multiplier
peak_stamina:block_place_cost_multiplier
peak_stamina:swim_cost_multiplier
peak_stamina:climb_cost_multiplier
peak_stamina:elytra_cost_multiplier
peak_stamina:parcool_cost_multiplier
peak_stamina:walljumptxf_cost_multiplier
peak_stamina:combatroll_cost_multiplier
peak_stamina:bonus_stamina_capacity
peak_stamina:bonus_stamina_decay_rate
peak_stamina:bonus_stamina_decay_delay
peak_stamina:excess_conversion_multiplier
peak_stamina:shieldexp_bonus_gain_multiplier
Commands
/stamina get:查看你当前的耐力值和最大耐力值。
/stamina set <amount>:将你的当前耐力值设置为指定数值。
/stamina attr <attribute> <value>:修改个人耐力属性。
/stamina debug:显示所有耐力统计数据、惩罚和属性倍率的完整调试信息。
/stamina reload:重新加载所有缓存和配置值。
调试
查找正确的 NBT 路径
在配置文件中猜测路径,然后启动游戏并检查 logs/latest.log。如果路径错误,模组会打印一条 WARNING(警告),列出该层级可用的键名:使用这些键名来修正路径。
如果正确的路径仍然无法生效,请尝试在路径前加上 ForgeCaps. 前缀,再加上其余部分。例如:"NBT;ForgeCaps.legendarysurvivaloverhaul:temperature.temperature;*<;12;40;2.0;65535;❄"
获取十进制颜色值
Minecraft 配置文件使用十进制颜色值。取出你的十六进制颜色(例如 FF0000),通过任意 Hex 转 Decimal 转换器进行转换,然后将结果粘贴到你的配置中(例如 16711680)。
常见问题解答
Q:你能为 X 模组(口渴、温度等)添加兼容性吗? 你可以使用上文中的“通用惩罚与增益”部分自行实现。
Q:如何禁用饥饿惩罚? 将 maxHungerPenalty 设置为 0.0。你也可以将 maxExertionPenalty 设置为 0.0 以禁用疲劳。
Q:如何禁用负重系统? 将 enableWeightSystem 设置为 false。
Q:服务器端需要安装这个模组吗? 是的。
Q:这能在多人游戏中运行吗? 虽然尚未在所有版本中进行 exhaustive(详尽)测试,但目前的测试未发现任何问题。
Peak Stamina
Replaces vanilla sprinting mechanics with a resource management system based on fatigue and hunger. comes with compatibility for Tough as Nails, Cold Sweat, ParCool and, Combat roll. For additional custom penalties or integrations, refer to the Advanced Features section below. ONLY COMPATIBLE WITH PARCOOL 3.4.3.3
Features
- Action Costs: Stamina is drained by sprinting, jumping, attacking, mining, swimming, climbing, and using items.
- Fatigue: Dropping below 25% stamina and staying there accumulates Fatigue, which temporarily reduces your maximum stamina cap.
- Food Poisoning: Eating bad food applies a lingering Poison penalty (purple bar) that blocks a portion of your max stamina until it decays.
- Weight System: Carrying heavy items reduces your max stamina. The more you carry, the greater the penalty.
- Climbing: Ladders consume stamina. Holding Shift enables a Slow Climb (40% speed) that costs no stamina and allows gradual regeneration.
- Hunger Penalty: Low food levels reduce your maximum stamina cap.
- HUD: A custom, low-profile stamina bar with visual indicators for fatigue, poison, weight, and active penalties.
BAR mode

ICON mode

Configuration Files
-
config/peak_stamina/common.toml: All core gameplay values (costs, recovery, penalties).
-
config/peak_stamina/lists.toml: Weight system, item costs, consumables, universal penalties/buffs, and exhaustion profiles.
-
config/peak_stamina/client.toml: HUD and visual settings.
-
Note: With the update v2.0.0 there is now an in game config ui! You can see what it will look like in the gallery. As of update v2.2.0 I will no longer update the description, you can still see some of the older features here in the desc though but it will be missing a lot.
Base Settings
General
enableStamina (Default: true): Master switch for the mod.
disableInCreative (Default: true): If true, Creative mode players are excluded from the stamina system entirely.
disableInSpectator (Default: true): If true, Spectator mode players are excluded from the stamina system entirely.
initialMaxStamina (Default: 100.0): The starting maximum stamina for all players. All penalties and modifiers are calculated against this base value.
slowClimbSpeed (Default: 0.4): The movement speed multiplier when slow climbing (set to 1 to disable)
Action Costs
Set any value to 0 to disable it. Use a negative value to restore stamina during that action instead of draining it.
depletionSprint (Default: 0.15): Drain per tick while running.
depletionJump (Default: 0.85): Instant drain on jump.
depletionAttack (Default: 3.45): Instant drain on weapon swing.
depletionMissedAttack (Default: 1.0): Instant drain on a missed swing.
depletionBlockBreak (Default: 1.1): Instant drain on block break.
depletionBlockPlace (Default: 1.1): Instant drain on block place.
depletionClimb (Default: 0.7): Drain per tick while on ladders.
depletionSwim (Default: 0.05): Drain per tick while in water.
itemInterruptionCooldown (Default: 120): Ticks an item remains unusable after running out of stamina while using it.
Recovery
recoveryPerTick (Default: 0.36): Base regeneration speed.
recoveryRestMult (Default: 1.45): Multiplier applied when standing still.
recoveryClimbMult (Default: 0.7): Multiplier applied when resting on a ladder.
recoveryDelay (Default: 50): Ticks before regeneration begins after performing an action.
Enchantments
These values act as multipliers. For example, 0.15 means a 15% reduction, and 0.60 means a 60% reduction.
lightweightLvl1 (Default: 0.25): Weight reduction multiplier for the Lightweight I enchantment.
lightweightLvl2 (Default: 0.50): Weight reduction multiplier for the Lightweight II enchantment.
lightweightLvl3 (Default: 0.75): Weight reduction multiplier for the Lightweight III enchantment.
tirelessLvl1 (Default: 0.20): Stamina cost reduction multiplier for the Tireless I enchantment.
tirelessLvl2 (Default: 0.40): Stamina cost reduction multiplier for the Tireless II enchantment.
tirelessLvl3 (Default: 0.60): Stamina cost reduction multiplier for the Tireless III enchantment.
Penalties & Limits
fatigueThreshold (Default: 0.25): Stamina percentage at which fatigue begins accumulating.
fatigueDurationToPenalty (Default: 180): Ticks spent in the critical zone before the fatigue penalty activates.
maxExertionPenalty (Default: 30.0): Maximum stamina lost due to fatigue.
maxHungerPenalty (Default: 30.0): Maximum stamina lost due to starvation.
hungerPenaltyThreshold (Default: 6): Food level (3 shanks) at which hunger penalties begin.
minMaxStamina (Default: 10.0): Hard floor for maximum stamina: it can never be reduced below this value.
penaltyRecoveryDelay (Default: 100): Ticks before fatigue begins healing after conditions improve.
penaltyBuildupRate (Default: 0.1): Penalty accumulated per tick when conditions worsen.
penaltyDecayRate (Default: 0.05): Penalty recovered per tick when conditions improve.
Intermediate Features
Sleep Mechanics
sleepMode (Default: DEFAULT): Controls how fatigue decays:
DEFAULT: Fatigue decays naturally over time. Sleeping and eating fatigue-curing food both reduce it.
HARDCORE: Fatigue never decays on its own. You must sleep or eat fatigue-curing food to remove it.
sleepFatigueReduction (Default: 20.0): Flat amount of fatigue penalty removed after a successful sleep. Set to a high number to fully clear it.
Note: Only food tagged with CURE;FATIGUE;value will cure fatigue. Multiple CURE entries can be chained on a single item: for example, CURE;FATIGUE;10;CURE;universalpenalty;10 removes 10 points of both. See the Consumables section for a full guide.
Combat & Dynamic Weapon Weight
The Weight Scaling Formula:
When weight scaling is enabled, the stamina drained by an attack is multiplied by a calculated weight factor based on the weapon you are holding.
Multiplier = 1.0 + (((WeaponWeight - Normalizer) / Normalizer) * ScaleFactor)
Hit Attack Settings:
depletionAttack (Default: 3.45): Base stamina drained per successful attack.
attackCostScalesWithWeight (Default: true): Enables or disables the dynamic weight formula for successful hits.
attackWeightNormalizer (Default: 3.0): The baseline weapon weight that results in exactly a 1.0x stamina cost multiplier.
attackWeightScaleFactor (Default: 1.0): How intensely weight affects the attack cost.
attackWeightMinMultiplier (Default: 0.4): The absolute minimum stamina cost multiplier.
attackWeightMaxMultiplier (Default: 5.0): The absolute maximum stamina cost multiplier.
Missed Attack Settings:
depletionMissedAttack (Default: 1.0): Base stamina drained when swinging at the air.
missedAttackCostScalesWithWeight (Default: true): Enables or disables the dynamic weight formula for missed attacks.
missedAttackWeightNormalizer (Default: 3.0): The baseline weapon weight for a 1.0x multiplier on missed attacks.
missedAttackWeightScaleFactor (Default: 1.0): How intensely weight affects the missed attack cost.
missedAttackWeightMinMultiplier (Default: 0.4): The minimum possible stamina cost multiplier for missed attacks.
missedAttackWeightMaxMultiplier (Default: 5.0): The maximum possible stamina cost multiplier for missed attacks.
Elytra Mechanics
Controls what happens when a player runs out of stamina while flying.
depletionElytra (Default: 0.25): Drain per tick while flying.
disableElytraWhenExhausted (Default: true): If true, the Elytra will aerodynamically stall when stamina hits 0. If false, flight continues normally.
exhaustedElytraDrag (Default: 0.86): Horizontal speed retained per tick during a stall. Lower = faster deceleration. (0.9 = 10% speed loss per tick.)
exhaustedElytraGravity (Default: -0.025): Extra vertical gravity per tick during a stall. Negative values pull the player downward.
exhaustedElytraMinSpeed (Default: 0.5): Speed threshold below which the Elytra force-closes and drops the player.
exhaustedElytraTickInterval (Default: 3): How often in ticks drag physics are applied. 1 = every tick.
Bonus Stamina
Controls how players earn bonus stamina and how it decays over time.
When Bonus Stamina exceeds your maximum capacity, the HUD bar dynamically stacks on top of itself. Each overflow tier is shaded slightly darker, and a multiplier label (e.g., 2x, 3x) appears on the left side of the bar.
enableExcessStaminaConversion (Default: true): If true, restoring stamina past the max via consumables converts the overflow into Bonus Stamina.
excessConversionRate (Default: 0.5): Percentage of excess converted. 0.5 = 50% (e.g., 10 overflow → 5 Bonus Stamina).
bonusStaminaDecayDelay (Default: 20): Ticks before Bonus Stamina begins decaying after being gained or used. (20 ticks = 1 second.)
bonusDecayScalesWithAmount (Default: true): If true, decay is a percentage of current bonus stamina: it burns faster when you have more. If false, decay is a flat amount.
bonusStaminaDecayRate (Default: 0.05): Bonus Stamina lost per second. With scaling enabled, 0.05 = 5% per second.
Advanced Features
Advanced configuration is located in config/peak_stamina/lists.toml.
Weight System
Tracks the total weight of items in your inventory and applies a stamina penalty when you carry too much. Penalty scales linearly between the threshold and the limit.
enableWeightSystem (Default: true): Enable or disable weight calculations.
weightPenaltyThreshold (Default: 125.0): Total weight at which the penalty begins (0%).
weightPenaltyLimit (Default: 400.0): Total weight at which the penalty reaches maximum (100%).
maxWeightPenaltyAmount (Default: 40.0): Maximum stamina reduction at full weight.
maxWeightRecursionDepth (Default: 3): How many levels deep to scan nested containers.
autoWeightBase (Default: 10.0): Base weight for items not explicitly listed.
How Weights Are Calculated
Every item's weight is determined by one of four priority tiers (highest wins):
- Explicit Item Weights: defined in
customItemWeights (Supports standard IDs and Virtual NBT IDs).
- Tag Weights: defined in
customTagWeights.
- Advanced NBT Extraction: defined in
nbtWeightPaths (Extracts hidden IDs to check against explicit weights).
- Auto-Weigher: heuristic fallback:
Weight = (autoWeightBase / MaxStackSize) × Count.
With autoWeightBase = 10.0, a sword (stack 1), 16 Ender Pearls, and 64 dirt blocks all weigh 10.0 total: carrying more of a stackable item doesn't multiply weight indefinitely. Containers (shulker boxes, backpacks) include the weight of their contents. Shulker Boxes, Curios, and PackedUp are supported automatically.
Explicit Item Weights
Format: "modid:item;weight": weight is per individual item, not per stack.
Note: This list also accepts "Virtual IDs" extracted by the Advanced NBT system (e.g., "tacz:9mm;0.05").
customItemWeights = [
"minecraft:netherite_chestplate;15.0",
"minecraft:diamond_sword;4.0",
"minecraft:obsidian;1.2",
"tacz:9mm;0.05"
]
Tag Weights
Format: "tag;weight": weight applies to each individual item within the tag.
customTagWeights = [
"forge:ores;0.25",
"forge:storage_blocks;0.15",
"forge:ingots;0.2"
]
Custom Container Paths
For backpack mods that store items in custom NBT. Only needed if a mod isn't detected automatically.
Format: "modid:item;path.to.list"
customContainerPaths = [
"somemod:satchel;Inventory",
"anothermod:backpack;StorageTag.Items"
]
Advanced NBT Weight Extraction (For Complex Mods)
WHEN TO USE THIS:
Most items in Minecraft use a standard Item ID (e.g., minecraft:apple). For those, you do NOT need this list; just put them directly into the Explicit Item Weights list.
However, some complex mods (like TACZ) use a single base item (e.g., tacz:ammo) and store the actual specific item ID (like tacz:9mm) hidden inside NBT folders. This list tells the weight system exactly where to look inside the NBT data to find that true "Virtual ID".
WHERE TO PUT THE IDS:
Once you define a path here, the weight system will extract the hidden Virtual ID. You must then put that extracted ID into your Explicit Item Weights list to assign it a weight.
Format: "base_item_id ; nbt.path.to.id ; fallbackWeight ; applyFallbackIfMissing"
Examples:
nbtWeightPaths = [
# Example 1: Ammo (Uses 'true' for the fallback flag)
# Looks inside 'tacz:ammo' for 'AmmoId'. If it finds an ID like 'tacz:9mm', it checks Explicit Weights.
# If 'tacz:9mm' isn't explicitly configured, it adds 0.05 weight.
# If the AmmoId tag is missing entirely, it still adds 0.05 because the flag is true.
"tacz:ammo;AmmoId;0.05;true",
# Example 2: Attachments (Uses 'false' for the fallback flag)
# Digs through a gun's NBT folders (opens AttachmentSCOPE, then tag, to read AttachmentId) to check for a scope.
# If a scope is found, it checks Explicit Weights, else adds 0.5.
# If no scope is equipped (the folder is empty), it adds 0.0 weight because the flag is false.
# (If it was true, it would add 0.5 phantom weight even if the gun had no scope. So false is better here)
"tacz:modern_kinetic_gun;AttachmentSCOPE.tag.AttachmentId;0.5;false"
]
Weight Limit Attribute
Increase a player's carry capacity with /stamina attr weight_limit <value>. Each point adds +0.5 to the threshold and +1.0 to the limit.
Item Depletion Costs
Assign stamina costs to any item. Multiple cost types can be stacked on a single item (e.g., a shield that drains stamina both to hold and to block with).
Use a negative cost value to restore stamina during the action instead of draining it.
itemInterruptionCooldown (Default: 80): Cooldown in ticks if you run out of stamina while using an item.
enableAttackCooldownWhenExhausted (Default: false): Different from itemInterruptionCooldown this one targets weapons, swords, axes, etc.
exhaustedAttackCooldownDuration (Default: 80): How long the cooldown for weapons is when swung while out of stamina.
Format: "ItemId;TYPE;Cost;TYPE;Cost..."
Cost types:
TICK: Drains stamina continuously while the item is in use. Cancels the action if stamina hits 0.
BLOCK: Drains stamina only when a Shield successfully blocks damage. Supports dynamic scaling: BLOCK;BaseCost;DamageMultiplier.
USE: Drains stamina instantly on right-click.
USE_ON_BLOCK: Drains stamina only when the tool successfully modifies a block state.
Examples:
# Shield: `0.2/tick` to hold; when hit, `2.0` flat + `80%` of incoming damage:
"minecraft:shield;TICK;0.2;BLOCK;2.0;0.8"
# Bow: `0.5/tick` to draw:
"minecraft:bow;TICK;0.5"
# Fishing Rod: `3.0` stamina to cast:
"minecraft:fishing_rod;USE;3.0"
A tag based list is also available using the same format, with a tag ID instead of an item ID. Specific item entries always take priority over tag entries.
Consumables System
Chain multiple effects onto a single item to create complex food and consumable interactions.
penaltyReliefDuration (Default: 25): Seconds the Resistance buff lasts after eating a relief item.
maxPoisonPenalty (Default: 40.0): Maximum stamina blocked by food poisoning.
poisonDecayDelay (Default: 45): Seconds after eating before the poison penalty begins to heal.
poisonDecayRate (Default: 0.05): How fast the poison bar drains after the delay expires.
Format: "ItemId;TYPE;Args...;TYPE;Args..."
Effect types:
INSTANT;Amount: Instantly restores Amount stamina.
BONUS;Amount: Grants Amount Bonus Stamina (gold bar). Consumed before normal stamina and decays over time.
POISON;Amount: Applies a food poisoning penalty (purple bar) of Amount. Decays after poisonDecayDelay seconds.
REGEN;Amount;Seconds: Modifies regen speed for Seconds. Positive = faster, negative = slower. (0.2 = +20%, -0.3 = -30%.)
PENALTY;Amount: Grants Resistance for penaltyReliefDuration seconds. Formula: 30% base + (Amount / 100). Caps at 80%.
CURE;Target;Amount: Removes Amount from a specific penalty. Valid targets: FATIGUE, HUNGER, POISON, WEIGHT, ALL, or any custom key (e.g., temperature or modid:effectid).
Examples:
# Restores 10.0 stamina and grants 5.0 Bonus Stamina.
"minecraft:apple;INSTANT;10.0;BONUS;5.0"
# Grants ~50% Resistance to penalty gain for the configured relief duration.
"minecraft:golden_carrot;PENALTY;20.0"
# Removes 100.0 points of Food Poisoning.
"minecraft:milk_bucket;CURE;POISON;100.0"
# Removes 50.0 Poison and 20.0 Fatigue.
"modid:herbal_tea;CURE;POISON;50.0;CURE;FATIGUE;20.0"
# Removes 100.0 points of penalty caused by the Wither Effect.
"minecraft:honey_bottle;CURE;minecraft:wither;100.0"
# Removes 50.0 from all active penalties and grants ~55% Resistance.
"minecraft:golden_apple;CURE;ALL;50.0;PENALTY;25.0"
Exhaustion Penalties
Define what happens when a player's stamina hits 0.
exhaustionCooldownDuration (Default: 60): Ticks (3 seconds) the penalties persist after hitting 0.
exhaustedSpeedPenalty (Default: -0.65): Sprint speed reduction when running at 0 stamina. Players will not regenerate stamina while doing this.
customExhaustionPenalties: A list of attribute modifiers applied at exhaustion.
Format: "AttributeName;Amount;Operation"
Operations: 0 = Add flat, 1 = Multiply base, 2 = Multiply total.
Example: slow the player by 15%:
"minecraft:generic.movement_speed;-0.15;2"
Universal Penalties (NBT & Status Effects)
Link any mod's data: thirst, temperature, radiation, magic: to the stamina system using comparators. Supports gradual buildup or instant application.
universalPenalties: The list of rules defining external penalties.
showIcons (Default: true): Toggle penalty icons on the HUD. (Located in peak_stamina-client.toml. Check your version's config comments for availability.)
Format: "Type;Key;Comparator;Threshold;WorstValue;MaxPenalty;ColorInt;IconText"
| Parameter |
Description |
| Type |
NBT (checks player data) or EFFECT (checks potion amplifier/level). |
| Key |
The NBT path (e.g., thirstLevel) or Effect ID (e.g., minecraft:poison). |
| Comparator |
Logic for calculating the penalty. See comparator modes below. |
| Threshold |
The safe value where penalty starts (0%). |
| WorstValue |
In SCALE mode: The value where penalty reaches 100%. In MULTIPLIER mode: The Maximum total penalty allowed (Hard Cap). |
| MaxPenalty |
In SCALE mode: Total penalty amount at WorstValue. In MULTIPLIER mode: Penalty amount per 1 unit of difference. |
| ColorInt |
Decimal color code for the HUD overlay (e.g., 16711680 is Red). |
| IconText |
Emoji or text to display on the bar. Write none to disable. |
EFFECT checks the amplifier, not the displayed level. Amplifier 0 = Level I.
Comparator Modes
| Operator |
Behavior |
> |
Linear penalty as value rises above Threshold, maxing at WorstValue. |
< |
Linear penalty as value falls below Threshold, maxing at WorstValue. |
* |
Each point above Threshold adds MaxPenalty, capped at WorstValue. Formula: (Current - Threshold) * MaxPenalty |
*< |
Each point below Threshold adds MaxPenalty, capped at WorstValue. Formula: (Threshold - Current) * MaxPenalty |
Prefix any operator with ! (e.g., !>, !*<) to apply the penalty instantly rather than building up gradually.
The 8th argument (IconText) sets what appears on the bar. Type any character or emoji directly (e.g., ?, ?), or use none to hide it.
Examples
# Linear penalty as thirst level falls below 6
"NBT;thirstLevel;<;6;0;20.0;38143;?"
Cold Sweat (Heat & Cold):
# Linear penalty for extreme heat (> 2) or extreme cold (< 2)
"NBT;targetTemperatureLevel;>;2;4;20.0;16724016;?"
"NBT;targetTemperatureLevel;<;2;0;20.0;65535;❄"
Multiplier (Thirst):
# Each point below 6 adds 2.0 penalty, capped at 30
"NBT;thirstLevel;*<;6;30;2.0;38143;?"
Multiplier (Poison Effect):
# Each amplifier level adds 5.0 penalty, capped at 50
"EFFECT;minecraft:poison;*;0;50;5.0;4488448;☣"
Instant Application:
# Instantly applies the penalty using the ! prefix
"EFFECT;hordes:infected;!*;0;80;10.0;8388736;?"
Universal Buffs (NBT & Status Effects)
Works identically to Universal Penalties, but grants Bonus Stamina instead of penalizing the player.
universalBuffs: The list of rules defining external buffs.
universalBuffRegenWhileActive (Default: false): If false, Bonus Stamina from PASSIVE/BOTH modes pauses regeneration while the player is actively draining stamina or on regen cooldown.
Format: "Type;Key;ActionMode;Threshold;LimitOrCooldown;Amount;BurstAmount;ScalingFactor"
BurstAmount is exclusive to BOTH modes. ScalingFactor is exclusive to MULTIPLIER modes.
Action Modes:
| Action Mode |
Behavior |
PASSIVE_OVER / PASSIVE_UNDER |
Regenerates Bonus Stamina per second while the stat is above/below Threshold. |
BURST_OVER / BURST_UNDER |
Instantly grants Bonus Stamina once when the stat crosses Threshold. |
BOTH_OVER / BOTH_UNDER |
Grants a one-time burst when crossing Threshold, then regenerates passively up to the hardcap. |
Append _MULTIPLIER to any mode (e.g., PASSIVE_OVER_MULTIPLIER) to scale the effect based on how far past the threshold the player is.
LimitOrCooldown is context dependent: for PASSIVE/BOTH modes it sets the Bonus Stamina hardcap; for BURST modes it sets the cooldown in ticks before the burst can re-trigger.
Examples:
Passive (Regeneration Effect):
# Generates 1.0/sec while active, cap 20.0
"EFFECT;minecraft:regeneration;PASSIVE_OVER;-1;20.0;1.0"
Burst + Passive (NBT Mana Stat):
# Burst of 30.0 when mana exceeds 50, then 2.0/sec passively up to cap 100.0
"NBT;player_mana;BOTH_OVER;50;100.0;2.0;30.0"
Multiplier (Strength Effect):
# Strength I (Amp 0): 1.25x -> 2.5/sec, cap 25.0
# Strength II (Amp 1): 1.50x -> 3.0/sec, cap 30.0
"EFFECT;minecraft:strength;PASSIVE_OVER_MULTIPLIER;-1;20.0;2.0;1.25"
Nested NBT Paths
Use . to navigate inside nested NBT tags, chaining as many levels as needed:
# ForgeCaps tag → legendarysurvivaloverhaul:thirst tag → hydrationLevel value
"ForgeCaps.legendarysurvivaloverhaul:thirst.hydrationLevel"
# ForgeCaps tag → legendarysurvivaloverhaul:temperature tag → temperature value
"ForgeCaps.legendarysurvivaloverhaul:temperature.temperature"
# ForgeCaps tag → somemod:player_stats tag → skills tag → mining_level value
"ForgeCaps.somemod:player_stats.skills.mining_level"
Troubleshooting: If the correct path still doesn't work, try prefixing with ForgeCaps. followed by the rest of the path. Example: "NBT;ForgeCaps.legendarysurvivaloverhaul:temperature.temperature;*<;12;40;2.0;65535;❄"
⚠️ Experimental Features
These features are experimental and may impact performance or game balance. Use with caution.
Entity Stamina
Brings exhaustion mechanics to non-player entities, allowing mobs to run out of stamina and suffer attribute debuffs during combat.
enableMobStamina (Default: false): Master toggle for the mob stamina system.
enableExhaustionParticles (Default: true): Toggles the visual "sweat" particle effect when a mob enters an exhausted state.
Exhaustion Profiles
Define reusable attribute debuff templates that can be assigned to any mob. Modded attributes are fully supported.
Format: "ProfileName;AttributeID=Multiplier,AttributeID=Multiplier..."
Examples:
"MeleeTired;minecraft:generic.movement_speed=-0.40,minecraft:generic.attack_damage=-0.4"
"HeavyMelee;minecraft:generic.movement_speed=-0.60,minecraft:generic.attack_damage=-0.50"
Custom Mob Stamina (Whitelist)
Defines exactly which mobs participate in the stamina system. Mobs not listed here are completely unaffected.
Note: Boss entities are not guaranteed to function correctly with this system.
Format: "EntityID;MaxAttacks;ExhaustionTicks;ProfileName"
- EntityID: The registry name of the mob (e.g.,
minecraft:zombie).
- MaxAttacks: Number of melee hits or ranged shots before exhaustion triggers. For ranged mobs, counts shots fired regardless of whether they land.
- ExhaustionTicks: Duration the mob stays exhausted. (20 ticks = 1 second.)
- ProfileName: The Exhaustion Profile to apply, as defined above.
Ranged mobs using bows or crossbows that have an attack damage reduction in their Exhaustion Profile will also suffer reduced arrow velocity while exhausted.
Custom Stamina Actions
This system allows you to define specific triggers that consume or regenerate stamina. Each action follows a specific string format consisting of three main components.
Format: "Event_Type;Argument;Cost"
| Parameter |
Description |
| Event_Type |
The specific category of interaction or event that triggers the cost (e.g., MOUNT, HURT). |
| Argument |
Filters the event. Use a specific ID to target one object, or ANY to trigger the cost for all events in that category. |
| Cost |
The amount of stamina consumed. |
Available Event Types & Arguments
| Event Type |
Argument |
Description |
MOUNT |
entity_id |
Triggers when the player mounts an entity (e.g., minecraft:horse, minecraft:boat) |
INTERACT_ENTITY |
entity_id |
Triggers when right-clicking an entity (e.g., minecraft:villager, minecraft:pig). |
HURT |
damage_source |
Triggers when the player takes damage (e.g., fall, onFire, mob, arrow). |
FISH |
damage_source |
Triggers when the player successfully catches something with a fishing rod. |
Examples
"HURT;fall;10.0" Losing 10 stamina when taking fall damage.
"MOUNT;minecraft:horse;25.0" A one time cost of 25 stamina to mount a horse.
"FISH;ANY;-5.0" Regenerating 5 stamina every time you catch a fish.
"INTERACT_ENTITY;ANY;2.0" A small stamina drain for interacting with any mob.
Note: Use ANY for the argument if you want the stamina cost to apply regardless of the specific entity or damage source type. Negative values regen stamina instead.
ParCool Compat
As long as any stamina remains (> 0), you can initiate a ParCool action: even if the cost exceeds your current amount. You will simply drop to 0. Fast run and fast swim costs are added on top of the base sprint and swim costs.
Use a negative cost value to restore stamina during an action instead of draining it.
parCoolActionCosts: The list defining stamina costs for specific parkour moves.
Format: "ActionName;START;Cost;CONTINUE;Cost"
START: One-time cost when the action begins.
CONTINUE: Cost per tick while the action is active.
Examples:
# Vault: 8.0 stamina instantly:
"Vault;START;8.0"
# Wall Run: 15.0 to start, then 0.5/tick:
"WallRun;START;15.0;CONTINUE;0.5"
Combat Roll Compat
You can only use a roll when you have sufficient stamina to initiate one. Otherwise you can't.
combatRollCost: How much each roll costs.
Auto HUD System
All visual and HUD settings are in config/peak_stamina/client.toml. Disabled by default.
autoHudMode: How the bar animates: FADE, SLIDE, or BOTH.
autoHudSlideDir: Direction the bar travels when sliding away: UP, DOWN, LEFT, RIGHT.
autoHudEasing: Animation curve: LINEAR, SMOOTHSTEP, EASE_OUT_SINE, or EASE_OUT_EXPO. Detailed descriptions are in the config file comments.
autoHudFadeInSpeed / autoHudFadeOutSpeed: Independent speed controls for transparency transitions.
autoHudSlideInSpeed / autoHudSlideOutSpeed: Independent speed controls for slide movement.
autoHudSlideDistance: Pixels the bar moves when sliding off-screen.
autoHudLingerTime: Ticks the bar stays visible after stamina stops changing.
autoHudThreshold: Automatically shows the bar if stamina drops below this percentage.
autoHudShowOnPenalties: Forces the bar to stay visible whenever any active penalty is present.
Custom Tooltips
All visual and HUD settings are in config/peak_stamina/client.toml.
This system allows you to define which stamina related statistics appear on item tooltips in game.
enableTooltips (Default: true): Toggle to enable or disable stamina information on item tooltips.
advancedTooltipsOnly (Default: false): If true, stamina tooltips will only appear when F3+H (Advanced Tooltips) is active in game.
Format: "Content_Type;Placement;Label_Color;Value_Color"
| Parameter |
Description |
| Content_Type |
The specific stamina stat or effect to display (e.g., WEIGHT, INSTANT_STAMINA). |
| Placement |
Where the tooltip appears: BOTTOM (end of tooltip) or BELOW_NAME (immediately under the item name). |
| Label_Color |
The color of the stat name (e.g., "Weight:"). See color list below. |
| Value_Color |
The color of the numerical value or effect (e.g., "15.0"). See color list below. |
Available Content Types
WEIGHT: Displays the item's weight.
ATTACK_COST: Shows stamina drain per successful swing.
MISSED_ATTACK_COST: Shows stamina drain when swinging at air.
USE_COST: Shows instant cost on right-click.
TICK_COST: Shows continuous drain while holding/using.
BLOCK_COST: Shows stamina drain when blocking with a shield.
INSTANT_STAMINA: Displays how much stamina is restored upon consumption.
BONUS_STAMINA: Displays the amount of gold "Bonus Stamina" granted.
REGEN_MODIFIER: Shows the percentage boost or penalty to recovery speed.
CURES: Lists which penalties (Fatigue, Poison, etc.) the item removes.
You can configure what will show in the tooltips for each of them as well.
Color Palette
You can use the following standard Minecraft color names for both labels and values:
BLACK, DARK_BLUE, DARK_GREEN, DARK_AQUA, DARK_RED, DARK_PURPLE, GOLD, GRAY, DARK_GRAY, BLUE, GREEN, AQUA, RED, LIGHT_PURPLE, YELLOW, WHITE.
Examples
The order in which you list these entries determines the order they appear in your tooltips.
customTooltips = [
"WEIGHT;BOTTOM;DARK_GRAY;WHITE",
"ATTACK_COST;BOTTOM;DARK_GRAY;WHITE",
"INSTANT_STAMINA;BOTTOM;DARK_GRAY;GREEN",
"BONUS_STAMINA;BOTTOM;DARK_GRAY;GOLD",
"CURES;BOTTOM;DARK_GRAY;WHITE"
]
Note: Tooltips will only appear on items that actually possess the corresponding stat or effect. For example, a WEIGHT tooltip won't show on an item with 0 weight unless explicitly configured.
Attributes & Commands
Attributes
peak_stamina:max_stamina
peak_stamina:stamina_regen
peak_stamina:stamina_action_recovery # Multiplies stamina restored during actions
peak_stamina:regen_delay_multiplier
peak_stamina:exhaustion_duration_multiplier
peak_stamina:current_stamina
peak_stamina:penalty_gain_multiplier
peak_stamina:penalty_decay_multiplier
peak_stamina:max_global_penalty_multiplier
peak_stamina:max_fatigue_penalty_multiplier
peak_stamina:max_hunger_penalty_multiplier
peak_stamina:max_poison_penalty_multiplier
peak_stamina:max_weight_penalty_multiplier
peak_stamina:slow_climb_speed
peak_stamina:exhausted_sprint_speed
peak_stamina:weight_limit
peak_stamina:current_weight
peak_stamina:weight_calculation_multiplier # Multiplies the weight of all items
peak_stamina:global_stamina_usage
peak_stamina:jump_cost_multiplier
peak_stamina:sprint_cost_multiplier
peak_stamina:attack_cost_multiplier
peak_stamina:missed_attack_cost_multiplier
peak_stamina:shield_block_cost_multiplier
peak_stamina:shieldexp_parry_cost_multiplier
peak_stamina:item_cost_multiplier
peak_stamina:block_break_cost_multiplier
peak_stamina:block_place_cost_multiplier
peak_stamina:swim_cost_multiplier
peak_stamina:climb_cost_multiplier
peak_stamina:elytra_cost_multiplier
peak_stamina:parcool_cost_multiplier
peak_stamina:walljumptxf_cost_multiplier
peak_stamina:combatroll_cost_multiplier
peak_stamina:bonus_stamina_capacity
peak_stamina:bonus_stamina_decay_rate
peak_stamina:bonus_stamina_decay_delay
peak_stamina:excess_conversion_multiplier
peak_stamina:shieldexp_bonus_gain_multiplier
Commands
/stamina get: View your current and maximum stamina.
/stamina set <amount>: Set your current stamina to a specific value.
/stamina attr <attribute> <value>: Modify a personal stamina attribute.
/stamina debug: Full debug readout of all stamina stats, penalties, and attribute multipliers.
/stamina reload: Reloads all caches and config values.
Debugging
Finding the Correct NBT Path
Guess the path in your config, then launch the game and check logs/latest.log. If the path is wrong, the mod prints a WARNING listing the available keys at that level: use those to correct it.
If a correct path still doesn't work, try prefixing with ForgeCaps. followed by the rest of the path. Example: "NBT;ForgeCaps.legendarysurvivaloverhaul:temperature.temperature;*<;12;40;2.0;65535;❄"
Getting Decimal Colors
Minecraft configs use decimal color values. Take your hex color (e.g., FF0000), run it through any Hex to Decimal converter, and paste the result into your config (e.g., 16711680).
Q&A
Q: Can you add compatibility for X mod (thirst, temperature, etc.)? You can do it yourself using the Universal Penalties & Buffs section above
Q: How do I disable the Hunger penalty? Set maxHungerPenalty to 0.0. You can also set maxExertionPenalty to 0.0 to disable Fatigue.
Q: How do I disable the Weight System? Set enableWeightSystem to false.
Q: Do I need this mod on the server? Yes.
Q: Does this work in multiplayer? While not exhaustively tested across all versions, testing has not revealed any issues.
评论 0
登录后参与评分
还没有评论,来抢沙发吧