用精美的食物栏替换饥饿值,显示你吃过的食物
饥饿值变为食物栏。每种消耗的食物都会占据一个独立槽位并提供增益效果。兼容你能想到的所有食物模组。
|
跨模组/资源包兼容
食物图标是动态生成的,在加载时根据物品自身的纹理渲染并缩放以适应状态栏,因此新增模组的食品、自定义资源包以及事后添加的物品都能正确显示,无需额外制作素材。
|
食物增益
食用每种食物都会在持续时间内增加最大生命值上限。与纹理类似,这些属性也是根据食物的营养值和饱和度动态生成的。你吃的食物种类越丰富,获得的额外最大生命值就越多。
|
|
|
营养衰减(可选)
如果你追求更深入的饮食体验,可以启用“营养衰减”功能(通过 doNutritionDecay 服务器配置项)。这将为游戏增加一个额外的维度,促使你寻找多种食物来源进行轮换。你的饮食越多样化,随时间推移受到的负面影响就越小。
如果你安装了多个食物模组并希望找到烹饪各种美食的理由,这会非常有趣。
|
饮食限制(可选)
启用“饮食限制”功能(通过 doDietRestrictions 服务器配置项),防止玩家将所有槽位都填满同一种类的餐食。每种食物按其主要食材分组,如牛肉、鱼类或浆果等,你不能同时拥有两种共享相同食材的活跃食物。如果食用的食物与恰好一个活跃食物共享食材,则该活跃食物会被替换。
食材信息来源于食物模组自带的物品标签以及配方,因此牛排和牛肉炖菜都被归类为牛肉。按住 Shift 键悬停在食物上即可查看其食材以及当前是否可以食用。
|
配置项
以下内容均可在游戏内配置菜单中编辑,或直接修改 config/renourisheddelight/ 目录下的文件。
客户端 (client.json5) — 仅用于你自己的显示设置,不会同步到服务器。
foodBarOffsetX / foodBarY — 移动食物栏的位置,单位为像素。最简便的设置方式是在配置菜单中拖动它。默认值为 0。
goldenPaletteItem — 当“滋养”效果激活时,用作金色色调参考的物品。默认为 minecraft:golden_carrot。
showFoodDisplayInInventory — 在物品栏旁边显示当前活跃的食物列表。默认为 false。
clipOddMaxHealthHeart — 隐藏无法填满的那个半颗心(当最大生命值为奇数时)。默认为 true。
compactHealthBar — 将生命值保持为单行 10 颗心,并按比例填充。默认为 false。
holdToViewNutrition — 仅在按住查看营养快捷键(默认为左 Shift)时,食物提示才会显示营养值、饮食限制以及是否可食用。关闭后则始终显示。默认为 true。
服务器(server.json5)— 游戏规则。在专用服务器上,请在服务器端编辑此文件。
playerStartingHealth — 任何食物加成前的基础最大生命值。默认值为 20。
maxConsumableFood — 同时生效的食物数量上限。默认值为 3。
foodDrainRate — 槽位倒计时速度,以百分比表示。50 为半速,0 永不消耗。默认值为 100。
regenHealthTickInterval — 自然恢复之间的刻数间隔。默认值为 60。
regenDelayAfterDamage — 受到伤害后到恢复重新开始的等待刻数,饱食期间跳过。默认值为 60。
nutritionDecayRate — 每餐损失的持续时间百分比,以及当食物离开近期列表后恢复的数值。默认值为 1。
nutritionDecayWindow — 必须食用多少种其他食物后,某种食物才开始恢复。默认值为 3。
nutritionDecayFloor — 食物持续时间最低可降至的百分比。默认值为 10。
doNutritionDecay — 重复食用同种食物会缩短其加成的持续时间。默认值为 false。
doSleepFoodDrain — 跳过夜晚会消耗所有人的食物值。默认值为 true。
doNourishment — 一整条新鲜食物栏提供“滋养”效果。默认值为 false。
doStarvation — 当食物条为空时施加饥饿效果。默认值为 true。
doPreventSprint — 玩家在吃过东西之前无法冲刺。默认值为 false。
doReplaceLowestFood — 在所有槽位已满的情况下进食,会替换最接近耗尽的食物。关闭后,你需要等待一个槽位空出才能进食。默认值为 true。
doFoodTopUps — 食用已激活的食物会将其补满。关闭后,你需要等待它耗尽后才能再次食用。默认值为 true。
doDietRestrictions — 如果食用的食物与当前激活的食物共享主要原料(如牛肉、鱼类、浆果……),则会替换该食物,前提是只有一种激活食物与之共享且 doReplaceLowestFood 处于开启状态。否则你将无法食用它。原料通过物品标签和配方自动识别,因此牛排和牛肉炖菜都算作牛肉。默认值为 false。
通用设置(common.json5)— 新世界启动时的食物加成、持续时间乘数和饥饿效果。每个世界在创建后会保留自己的副本,操作员可以在游戏内的食物、持续时间和饥饿界面中进行编辑。
命令
两者都需要权限等级 2。
/renourisheddelight clear [<targets>] 清空玩家的食物条。
/renourisheddelight decay reset [<targets>] [<item>] 将衰减的食物恢复到完整持续时间。
整合包
预设是数据包中的 JSON 文件。你定义的任何内容将成为配置屏幕中该物品的默认值,玩家仍可以对其进行编辑或重置回默认值。
your_pack/
pack.mcmeta
data/renourisheddelight/foodpresets/anything.json
pack.mcmeta 需要设置为 "pack_format": 48 以兼容 1.21.1。文件名不重要,你可以将条目拆分到任意数量的文件中。
[
{
"item": "minecraft:cake",
"attributes": [
{ "attribute": "minecraft:generic.max_health", "operation": "add_value", "amount": 4.0, "duration": 6000 }
]
}
]
attributes 是可选的。operation 可以是 add_value、add_multiplied_base 或 add_multiplied_total,其中 0.15 代表 15%。duration 以刻为单位,每秒 20 刻。可放置的食物使用物品 ID,例如 minecraft:cake。除非你声明了自己的 minecraft:generic.max_health 条目,否则源自食物营养值和饱和度的最大生命值加成将被保留。
饮食限制
限制来自 c:foods/* 物品标签,因此数据包可以通过常规标签文件来重塑它们。向现有标签添加物品,或创建新标签以生成新的限制。
your_pack/
pack.mcmeta
data/c/tags/item/foods/beef.json
{
"replace": false,
"values": [ "minecraft:beef" ]
}
标记原始原料而非每道菜:配方会将标签带入由其制成的所有物品中,因此这一个条目即可涵盖牛排、炖菜和三明治。当一种食物同时存在于宽泛标签和更窄标签中时(例如 c:foods/raw_meat 和 c:foods/beef),仅计算较窄的那个标签。c:foods/edible_when_placed、c:foods/food_poisoning 和 c:foods/golden 被忽略,因为它们描述的是食物的行为方式而非其成分。工具提示中显示的名称来自 tag.item.c.foods.beef 翻译键,并回退至标签名称。编辑后请运行 /reload。
使用 AI 生成预设
将此粘贴到 AI 助手中,并附上模组的物品列表,然后在发布前检查数值。
Write a Renourished Delight food preset for Minecraft 1.21.1.
Output one JSON array, no commentary. Each entry:
{ "item": "namespace:id",
"attributes": [ { "attribute": "...", "operation": "add_value|add_multiplied_base|add_multiplied_total",
"amount": 0, "duration": 0 } ] }
- 涵盖所有可食用物品,包括可放置的物品如蛋糕、派和炖菜。
使用物品 ID,而非方块 ID。
- 与制作成本平衡:更稀有或多步骤的食物应提供更高的收益。
- 保持克制。+1 到 +3 的最大生命值属于正常范围,+4 则属于展示级效果。百分比数值介于 0.05 至 0.2 之间。持续时间在 2400 至 6000 tick(20 tick = 1 秒)之间。
- 根据食材主题设计每种食物,而不是让所有食物都提供最大生命值加成。肉类提供伤害和生命值加成,蔬菜和汤类提供速度或挖掘速度加成,甜食提供短时爆发加成,鱼类提供水下特性加成。
- 对于异常强大的食物,偶尔添加一个负面属性作为平衡。
- 仅使用真实存在的属性 ID:minecraft:generic.max_health, minecraft:generic.movement_speed, minecraft:generic.armor, minecraft:generic.attack_damage, minecraft:generic.knockback_resistance, minecraft:generic.safe_fall_distance, minecraft:player.block_break_speed。
物品列表:
Bug 报告和建议请前往 问题追踪器。
Replaces the hunger bar with a beautiful food bar that shows what you ate
The hunger bar becomes a food bar. Every food item consumed takes its own slot and gives you bonuses. Compatible accross all the food mods you can think of.
|
Cross-mod/resourcepack Compatible
Food icons are generated, each one is rendered from the item's own texture at load and downscaled to fit the bar, so modded food, custom resource packs and items added after the fact all show up correctly with no extra art needed.
|
Food Bonuses
Every food item consumed gives you increased max health for a set duration. Like the textures, these attributes are also generated based on the food's nutrition and saturation. The more varity you eat, the more max health you'll receive.
|
|
|
Nutrition Decay (Optional)
For those looking for a more in-depth eating experience, you can enable Nutrition Decay (via the doNutritionDecay server config). This will add an extra dimension to the game by nudging you to find a range of food source to cycle on. The more varied your diet, the less impact it will have over time.
This can be fun if you have multiple food mods and want to find a reason to cook various meals.
|
Diet Restrictions (Optional)
Enable Diet Restrictions (via the doDietRestrictions server config) to stop players from filling every slot with the same kind of meal. Each food is grouped by its main ingredients, such as beef, fish or berries, and you can't have two active foods that share one. Eating a food that shares an ingredient with exactly one active food swaps that food out instead.
Ingredients are worked out from the item tags food mods already ship with, and from recipes, so a steak and a beef stew both count as beef. Hold Shift over a food to see its ingredients and whether you can eat it right now.
|
Highly Configurable
Not happy with the attributes or duration? Want to make certain food items special? The in-game config menu lets you edit the bonuses of every food item, scale bonus durations per attribute, set up starvation effects, and tweak both the server rules and your own HUD. This mod is shipped with presets for certain mods like Farmer's Delight and Neapolitan to work with Iron's Spells 'n Spellbooks and the RPG series. If you want presets for a mod, make an issue here and I'll gladly look into it :)
|
|
Configs
Everything below can be edited from the in-game config menu, or directly in the files under config/renourisheddelight/.
Client (client.json5) — your own display, never synced to servers.
foodBarOffsetX / foodBarOffsetY — moves the food bar, in pixels. Easiest to set by dragging it in the config menu. Default 0.
goldenPaletteItem — item whose colors tint the food icons gold while Nourishment is active. Default minecraft:golden_carrot.
showFoodDisplayInInventory — shows your active foods next to the inventory. Default false.
clipOddMaxHealthHeart — hides the half heart that can never fill when max health is odd. Default true.
compactHealthBar — keeps health to a single row of 10 hearts that fill proportionally. Default false.
holdToViewNutrition — food tooltips only show nutrition, diet restrictions and whether you can eat it while you hold the View Nutrition key (Left Shift by default). When off, it is always shown. Default true.
Server (server.json5) — gameplay rules. On a dedicated server, edit the file on the server.
playerStartingHealth — base max health before any food bonuses. Default 20.
maxConsumableFood — how many foods can be active at once. Default 3.
foodDrainRate — how fast slots tick down, in percent. 50 is half speed, 0 never drains. Default 100.
regenHealthTickInterval — ticks between natural regen. Default 60.
regenDelayAfterDamage — ticks to wait after damage before regen resumes, skipped while nourished. Default 60.
nutritionDecayRate — percent of duration lost per meal, and won back once the food leaves your recent list. Default 1.
nutritionDecayWindow — how many other foods you must eat before one starts recovering. Default 3.
nutritionDecayFloor — lowest percent of its duration a food can drop to. Default 10.
doNutritionDecay — repeating a food shortens how long its bonuses last. Default false.
doSleepFoodDrain — skipping the night drains everyone's food. Default true.
doNourishment — a full bar of fresh food grants Nourishment. Default false.
doStarvation — apply starvation effects when the bar is empty. Default true.
doPreventSprint — players can't sprint until they've eaten something. Default false.
doReplaceLowestFood — eating with every slot full replaces the food closest to running out. When off, you have to wait for a slot to free up. Default true.
doFoodTopUps — eating a food that is already active tops it back up. When off, you have to wait for it to run out before eating it again. Default true.
doDietRestrictions — eating a food that shares a main ingredient (beef, fish, berries...) with an active food swaps that food out, as long as only one active food shares it and doReplaceLowestFood is on. Otherwise you can't eat it. Ingredients are worked out automatically from item tags and recipes, so steak and beef stew both count as beef. Default false.
Common (common.json5) — the food bonuses, duration multipliers and starvation effects new worlds start with. Each world keeps its own copy once created, which operators can edit in-game from the food, duration and starvation screens.
Commands
Both need permission level 2.
/renourisheddelight clear [<targets>] empties a player's food bar.
/renourisheddelight decay reset [<targets>] [<item>] puts decayed foods back to full duration.
Modpacks
Presets are JSON in a datapack. Whatever you define becomes that item's default in the config screen, and players can still edit it or reset back to it.
your_pack/
pack.mcmeta
data/renourisheddelight/foodpresets/anything.json
pack.mcmeta needs "pack_format": 48 for 1.21.1. File names do not matter and you can split entries across as many as you like.
[
{
"item": "minecraft:cake",
"attributes": [
{ "attribute": "minecraft:generic.max_health", "operation": "add_value", "amount": 4.0, "duration": 6000 }
]
}
]
attributes is optional. operation is add_value, add_multiplied_base or add_multiplied_total, where 0.15 means 15%. duration is in ticks, 20 per second. Placeable foods use the item id, like minecraft:cake. The max health bonus derived from the food's nutrition and saturation is kept unless you declare your own minecraft:generic.max_health entry.
Diet restrictions
Restrictions come from the c:foods/* item tags, so a datapack can reshape them with ordinary tag files. Add items to an existing tag, or make a new tag to create a new restriction.
your_pack/
pack.mcmeta
data/c/tags/item/foods/beef.json
{
"replace": false,
"values": [ "minecraft:beef" ]
}
Tag the raw ingredient rather than every dish: recipes carry it into anything made from it, so this one entry covers steak, stews and sandwiches. When a food is in both a broad tag and a narrower one, like c:foods/raw_meat and c:foods/beef, only the narrower one counts. c:foods/edible_when_placed, c:foods/food_poisoning and c:foods/golden are ignored since they describe how a food behaves, not what is in it. The name shown in tooltips comes from the tag.item.c.foods.beef translation key, falling back to the tag's name. Run /reload after editing.
Generating a preset with AI
Paste this into an assistant along with the mod's item list, then check the numbers before shipping.
Write a Renourished Delight food preset for Minecraft 1.21.1.
Output one JSON array, no commentary. Each entry:
{ "item": "namespace:id",
"attributes": [ { "attribute": "...", "operation": "add_value|add_multiplied_base|add_multiplied_total",
"amount": 0, "duration": 0 } ] }
- Cover every edible item, including placeable ones like cakes, pies and stews.
Use the item id, not the block id.
- Balance against crafting cost: rarer or multi step foods earn more.
- Keep it restrained. +1 to +3 max health is normal, +4 is a showpiece. Percentages
sit between 0.05 and 0.2. Durations 2400 to 6000 ticks (20 ticks = 1 second).
- Theme each food after its ingredients instead of giving everything max health.
Meat to damage and health, vegetables and soups to speed or mining speed,
sweets to short bursts, fish to underwater traits.
- Use an occasional negative attribute to pay for an unusually strong food.
- Only real ids: minecraft:generic.max_health, minecraft:generic.movement_speed,
minecraft:generic.armor, minecraft:generic.attack_damage,
minecraft:generic.knockback_resistance, minecraft:generic.safe_fall_distance,
minecraft:player.block_break_speed.
Item list:
Bugs and ideas go on the issue tracker.
评论 0
登录后参与评分
还没有评论,来抢沙发吧