
Sustenance 用基于消化的机制替换了原版的饥饿和生命恢复系统。你不再需要通过维持饥饿条来获得被动治疗,而是需要在三个槽位的胃队列中消化食物。消化后的食物会提供临时最大生命值加成和被动生命恢复效果,随着食物的消化,这些效果会逐渐衰减。如果你的胃里没有食物,你的最大生命值将降至 12 HP(6 颗心),且所有被动治疗效果停止。
玩家功能特性
- 三槽位胃:你可以同时消化最多 3 种食物。如果胃已满,则无法进食新食物,直到有空闲槽位。重复食用已在胃中的食物会刷新其计时器。
- 消化衰减:食物在消化过程的前半段保持 100% 效率。在后半段,其生命值加成和恢复速率线性衰减至 0%。
- HUD 覆盖层:标准的饥饿条被替换为显示消化计时器和颜色编码效率的槽位进度指示器。
- 饥饿负面效果用途:原版的饥饿效果会加速你的消化过程,让你能更快地清空胃槽(用于清除有毒食物很有用)。
- 食物日志:一本可制作的书籍,记录你吃过的每一种食物。打开它可以查看已发现食物的属性、类别和持续时间,或者在主手外副手持有一个物品时进行分析,以判断它是否为新发现的食物。

食物类别
默认情况下,食物被分为三类:
- 基础食物(面包、苹果、胡萝卜):提供 +2.0 最大生命值(+1 颗心)和缓慢的治疗效果(约每 10 秒恢复 1 HP),持续 3 分钟。
- 高级餐点(熟肉、金胡萝卜、炖菜):提供 +8.0 最大生命值(+4 颗心)和快速的治疗效果(约每 2.5 秒恢复 1 HP),持续 20 分钟。
- 有毒食物(腐肉、蜘蛛眼、河豚):造成 -2.0 最大生命值惩罚并停止治疗效果,持续 1 分钟。

整合包开发者功能特性
Sustenance 旨在无缝集成到硬核、生存或 RPG 主题的整合包中。所有机制都在世界服务器配置文件中暴露(saves/<world>/serverconfig/sustenance-server.toml):
- 自定义食物属性:使用格式
"namespace:item_id|hp_bonus|regen_bonus|duration_ticks" 为特定物品定义自定义的生命值加成、恢复速率和消化持续时间。
- 类别覆盖:使用列表配置或物品标签(
sustenance:basic_food、sustenance:premium_meal、sustenance:toxic_food)轻松强制将自定义模组物品归类为基础、高级或有毒组。
- 胃豁免:完全排除某些物品(如紫颂果或自定义药水/瓶子),使它们可以自由食用/饮用,而不会占用胃槽或出现在食物日志中。
- 共享发现池:选项可将食物发现同步到服务器上所有玩家,使食物研究成为团队努力的结果。
- 灵活缩放:调整基础生命值惩罚(默认为 -8 HP)、类别计时器和消化速度倍数。

入门指南
食物日志合成配方
要制作食物日志,请在任意合成网格中按以下顺序排列物品:
[ Ink Sac ] [ Feather ]
[ Book ] [ Bowl ]

兼容性
- 专为 Minecraft 26.2 上的 NeoForge 构建。
- 除非在服务器配置中进行覆盖,否则模组化食物会自动分类(营养值 >= 6 映射为高级,其他映射为基础)。
- 自定义属性混合器动态处理最大生命值变化,防止在与其它修改生命值/属性的模组结合使用时出现突然的生命值钳制和受伤动画故障。

Sustenance replaces the vanilla hunger and regeneration system with a digestion-based mechanic. Instead of maintaining a hunger bar for passive healing, you digest food in a three-slot stomach queue. Digested food grants temporary max HP boosts and passive health regeneration that slowly decays as the food digests. If you have nothing in your stomach, your max health is reduced to 12 HP (6 hearts) and all passive healing stops.
Features for Players
- Three-Slot Stomach: You can digest up to 3 foods at a time. If your stomach is full, you cannot eat new foods until a slot empties. Re-eating a food already in your stomach refreshes its timer.
- Digestion Decay: Foods run at 100% efficiency during the first half of their digestion. In the second half, their health boosts and regeneration rates decay linearly to 0%.
- HUD Overlay: The standard hunger bar is replaced with slot progress indicators showing digestion timers and color-coded efficiency.
- Hunger Debuff Utility: The vanilla Hunger effect speeds up your digestion, allowing you to empty your stomach slots faster (useful to clear out toxic foods).
- The Food Journal: A craftable book that registers every food you eat. You can open it to see stats, categories, and durations for all discovered foods, or hold an item in your off-hand to analyze if it is new.

Food Categories
By default, foods are classified into three groups:
- Basic Food (Bread, Apples, Carrots): Grants +2.0 max HP (+1 heart) and slow healing (~1 HP per 10 seconds) for 3 minutes.
- Premium Meal (Cooked Meats, Golden Carrots, Stews): Grants +8.0 max HP (+4 hearts) and fast healing (~1 HP per 2.5 seconds) for 20 minutes.
- Toxic Food (Rotten Flesh, Spider Eyes, Pufferfish): Inflicts -2.0 max HP penalty and stops healing for 1 minute.

Features for Modpack Developers
Sustenance is designed to integrate cleanly into hardcore, survival, or RPG-themed modpacks. All mechanics are exposed in the world server configuration (saves/<world>/serverconfig/sustenance-server.toml):
- Custom Food Stats: Define custom health bonuses, regeneration rates, and digestion durations for specific items using the format:
"namespace:item_id|hp_bonus|regen_bonus|duration_ticks".
- Category Overrides: Easily force custom modded items into Basic, Premium, or Toxic groups using list configs or item tags (
sustenance:basic_food, sustenance:premium_meal, sustenance:toxic_food).
- Stomach Exemptions: Exclude items entirely (like Chorus Fruits or custom potions/bottles) so they can be eaten/drunk freely without blocking stomach slots or appearing in the Food Journal.
- Shared Discovery Pool: Option to sync food discoveries globally across all players on the server, making food research a team effort.
- Flexible Scaling: Tweak base health penalties (default -8 HP), category timers, and digestion speed multipliers.

Getting Started
Food Journal Recipe
To craft the Food Journal, arrange these items in any crafting grid:
- Top Row: Ink Sac, Feather
- Bottom Row: Book, Bowl
[ Ink Sac ] [ Feather ]
[ Book ] [ Bowl ]

Compatibility
- Built for NeoForge on Minecraft 26.2.
- Modded foods are automatically categorized (nutrition values >= 6 map to Premium, others to Basic) unless overridden in the server config.
- Custom attribute mixins handle maximum HP changes dynamically, preventing sudden health clamping and hurt-animation glitches when combining Sustenance with other health/attribute modifying mods.
评论 0
登录后参与评分
还没有评论,来抢沙发吧