-
Notifications
You must be signed in to change notification settings - Fork 1
English
This is a Minecraft mod for 1.21.1 NeoForge that adds a nutrition system to Minecraft, giving players' survival experience more depth!
Provides an in-game nutrition system. Players can gain nutrition values by eating food. Insufficient nutrition of a certain type triggers negative effects, while adequate nutrition grants attribute bonuses or powerful effects! (And of course, everything is fully customizable! It all depends on you!)
Last Updated: 2025/6/25
Mod Version: 2.2.0
This mod is available on CurseForge and Modrinth — you should be able to download it easily. If you can't connect to those sites, for players in mainland China, you can also download it from MCMOD. Additionally, the mod's GitHub repository offers Release downloads, so you can grab the latest version directly from there. Next, open your Minecraft version directory, find a version with the NeoForge loader, and place the downloaded mod file (usually named appleseed-xxx-xxx.jar) into its mods folder. Then, launch the game. You should see a mod called AppleSeed in the list on the left side of the "Mods" screen. If you followed the steps above and successfully see the expected content, congratulations — the mod has been successfully installed in your game!
You've successfully installed the mod! Now you can start a survival mode game and freely explore the mod's content. If you haven't changed any configuration, opening your inventory should reveal the mod's button next to the recipe book button — it features a drumstick icon, resembling your hunger bar. Now, press that button and you'll see an interface displaying your nutrition data. Close that interface, find any vanilla food item, open your inventory, and hover your mouse over it. You should see "Nutrition: ..." in the item tooltip, listing the nutrition values you'll gain from eating it. If you're hungry now, eat it, then find that drumstick button again and enter the interface. You should notice that one of your nutrition values has increased. Likewise, by default, losing hunger or taking damage will also cause you to lose a certain amount of all nutrition values. So, protect yourself and eat well. If you keep at it, you'll soon see your health increase. Open the interface again, and you'll find a speech-bubble-like icon near the title. Hover over it to see your currently active nutrition effects. As long as you maintain adequate nutrition, these effects will persist and even grow stronger over time! Of course, if you're not satisfied with the built-in dietary effects, or if you're developing your own modpack... Then keep reading the wiki below — it will teach you how to take control of everything!
Now, open your version folder, then open the config directory. Inside you should find a file called appleseed_common.toml — this is the mod's configuration file. In the General Settings category, you'll find these three config options:
ignore_hunger
entrance_visibility
craft_chain_search_depth
They control the following respectively:
Whether nutrition intake ignores hunger
Entrance button visibility
Craft chain search depth
Let's go over each one in detail.
This controls whether nutrition intake ignores hunger. Normally, you can't eat when full, so in most cases you don't need to touch this option — keep it as false. However, if you've installed a mod like AlwaysEat that allows eating while full, and you want to gain nutrition even when satiated, change this option to true.
This controls the entrance button visibility. It accepts the following values:
default — Default visibility, displayed on the inventory screen
invisible — Hidden; in this state, you can only open the interface using the hotkey or commands
ftb_compat — Requires the FTB Library mod. Once installed, the button appears in FTB Library's left sidebar.
This controls the craft chain search depth. Before understanding its effect, you need to understand how the mod's auto-calculation feature works. This mod provides automatic item nutrition calculation, which can automatically fill in item nutrition data based on available ingredients. When calculating an item's nutrition data, the mod searches all ingredients of its recipe. If an ingredient is a food, its nutrition data is calculated first. If an ingredient is not a food, the mod checks whether it already has nutrition data — if so, it uses it directly; if not, it checks whether the counter is greater than this config value. If not, it continues downward while incrementing the counter. So this config option sets the maximum number of consecutive non-food items allowed on any branch of the craft tree. Larger values can cover more foods but will slow down auto-calculation. However, very large values may be acceptable because all generated nutrition data is persistent — as long as the mod list and food recipes don't change, the nutrition data doesn't need to be updated.
The following content requires some understanding of datapack creation. Before proceeding, please familiarize yourself with the basics of datapacks.
By writing item nutrition data files, you can make foods from other mods nutritious!
Next, we'll use the tomato from the Farmer's Delight mod as an example to demonstrate how to write item nutrition data files in sections 2.4 and 2.5. (Hopefully, you've already installed the Farmer's Delight mod!)
First, you need a datapack. Then open the datapack's data directory and create a subdirectory with any name you like (no spaces or symbols other than underscores). This directory is your datapack's namespace.
Then, create a diet directory inside it. This is where most data files for this mod are stored.
Next, create the following directories inside it — they'll be used in the following sections:
blocks
foods
groups
Now you have the foundation for customizing everything in this mod!
Continuing from above, we now have a basic datapack structure. Next, create a new file called farmersdelight_tomato.json in the foods directory you just created.
Then write the following content inside:
{
"source_item":"farmersdelight:tomato",
"nutritions":{
"fruits":0.02,
"vegetables":0.02
}
}
Next, you can package your datapack and place it into your save for testing!
Finally, launch the game and enter your save. If everything is correct, you should see that tomatoes now have nutrition values!
The source_item field specifies which item this nutrition data file belongs to.
The nutritions field records the amount of each nutrition value, in the format <nutritionID>: a value between 0.0 and 1.0
In the previous tutorial, we added nutrition data for tomatoes, but you may find that some foods made with tomatoes still have no nutrition.
Is the auto-calculation system broken? No! To be precise, you need to use commands to update the nutrition data!
Next, let's go over some useful commands and their usage:
All commands in this mod start with /diet, covering most features you might need!
Usage: /diet cache <clear|regenerate|reload>
/diet cache clear — Clears the entire config/apple_seed_foods directory for subsequent regeneration.
/diet cache regenerate — Clears the entire config/apple_seed_foods directory, then regenerates and reloads. The nutrition data update operation mentioned earlier can be done with this command!
/diet cache reload — Reloads all server-side data.
Usage: /diet nutritions query
Displays the current nutrition data of the specified player.
Usage: /diet nutritions <set|add|remove> <count: 0.0-1.0>
Sets, adds to, or removes from the specified player's specified nutrition value.
Usage: /diet config set <ignoreHunger|entranceVisibility|craftChainSearchDepth>
Sets the corresponding config option to the specified value.
Usage: /diet screen
Opens the mod's interface.
Usage: /diet item count:0.0-1.0 []
Sets or creates the specified nutrition value for the specified item in config/appleseed_data.json. If itemID is omitted, it defaults to the held item.
Usage: /diet block count:0.0-1.0 []
Sets or creates the specified nutrition value for the specified block food in config/appleseed_data.json. If the bites parameter is omitted, it defaults to 1 or leaves the existing data unchanged.
Yes, nutrition types can also be customized! However, nutrition data does not support hot-reloading!
Not satisfied with the default five nutrition types? Next, you'll learn how to create your own nutrition type!
Here we'll use creating a nutrition called "Vitamins" as an example to demonstrate how to create a new nutrition type.
Locate the datapack we created earlier, open the diet/groups directory, and create a new file called vitamin.json. The filename of this file is the ID of this nutrition type.
Then enter the following content:
{ "icon": "minecraft:golden_apple", "color": "#189132", "order": 5, "default_value": 0.5, "gain_multiplier": 1.0, "decay_multiplier": 1.0, "is_negative": false, "ignore_attack": false, "ignore_hunger": false, "beneficial": true, "translation_key":"diet.group.vitamin", "effects":[] }
Then you can package your datapack and load it. If there are no issues, you should be able to see your new nutrition type after flipping pages on the mod's interface!
Nutrition fields are somewhat complex, so let's go through them one by one.
This field controls the icon displayed for the nutrition on the Diet UI. Its value can be the item ID of any item in the game.
This field controls the color of the nutrition. It uses a hexadecimal RGB color code. Its effect applies to both the corresponding entry in the Tooltip and the percentage number on the Diet UI.
This field controls the position of the nutrition on the Diet UI. Its value must be a non-negative integer.
This field controls the initial value of the nutrition. It applies when the keepNutrition game rule is not enabled — it's the value reset to upon player death and the value given to new players joining the game. Its value can be any decimal between 0 and 1.
These two fields control the nutrition's gain efficiency and decay multiplier respectively. Their values can be any non-negative decimal.
Important note: By default, each time you take damage (regardless of whether health is lost), 0.1% of all nutrition values are deducted. Additionally, for every 1 hunger point lost, 0.5% of all nutrition values are deducted.
This field controls whether the nutrition is negative. If true, this nutrition will not propagate along the craft chain during the auto-calculation process.
These two fields control whether the nutrition ignores deductions caused by hunger loss or taking damage. Setting them to true makes the nutrition unaffected by the corresponding decay factors.
This field is still under development. Please keep it as true!
This field controls the translation key name of the nutrition, which is displayed in the Tooltip and on the Diet UI. It needs to be used with a resource pack containing the corresponding translation key.
This field controls the actual effects of the nutrition. You can configure the effective range and corresponding effects here. Each effect entry is stored as a string. Here is an example:
"0-25:effect(minecraft:nausea,0),attribute(minecraft:generic.max_health,-2.0)"
The actual effect of this entry is: when the nutrition value is between 0% and 25%, the player is permanently given Nausea I and -2 max health.
Here is a generic nutrition effect entry template:
"<min range>-<max range>:effect(<effectID>,<effectLevel>),attribute(<attributeID>,<attributeValue>)"
Don't want a certain existing nutrition type? You can disable them with a few simple steps!
In the datapack's diet/groups directory, create a disabled_groups.json file, then enter a "[]" inside. Add the nutrition IDs you want to disable, separated by commas, inside this "[]"!
Here's an example that disables all default nutrition types:
["vegetables","fruits","sugars","proteins","grains"]
This mod supports block-shaped foods from other mods!
Next, using the somewhat special Pumpkin Pie from the Farmer's Delight mod as an example, let's create block food data step by step!
Just like defining nutrition data for item foods, we first need to define its basic nutrition data file.
Unlike item foods, we create its nutrition data file in the datapack's diet/blocks directory.
The format of a block food nutrition data file is similar to item foods, but with some differences. Below is the content of the pumpkin pie nutrition data file:
{
"source_block": "farmersdelight:pumpkin_pie",
"bites": 4,
"nutritions": {
"sugars": 0.01,
"proteins": 0.0213,
"vegetables": 0.0135,
"grains": 0.015
}
}
Parts similar to item foods won't be repeated here. The bites field, unique to block food data, indicates how many times this food can be eaten, which determines what fraction of its nutrition is gained per bite.
Next, we need to let the mod know that this pumpkin pie block is edible food and can properly display its nutrition data. To achieve this, we need to use the "food blocks" tag provided by this mod.
We now need to create two directories named block and item respectively inside the tags directory under the appleseed namespace of the datapack. In both directories, create a file called food_blocks.json.
Then in appleseed/tags/block/food_blocks.json, write the following:
{
"values":[
"farmersdelight:pumpkin_pie" // Fill in the block ID of the target block here
]
}
In appleseed/tags/item/food_blocks.json, write the following:
{
"values":[
"minecraft:pumpkin_pie" // Fill in the item ID corresponding to the target block here
]
}
Of course, if you're using KubeJS, this process is even simpler.
Create a new script in KubeJS's server_scripts and write the following:
ServerEvents.tags("item", event => {
event.add("appleseed:food_blocks","minecraft:pumpkin_pie")
})
ServerEvents.tags("block", event => {
event.add("appleseed:food_blocks","farmersdelight:pumpkin_pie")
})
This will make the placed pumpkin pie nutritious!
Since the mod's nutrition auto-calculation system is not perfect and cannot be compatible with many mods' custom recipes, you can manually make these mods compatible by disabling recipes from participating in auto-calculation and writing simulated recipes.
First, let's use disabling all filling recipes from the Gensokyo Delight ~ Youkais' Feasts mod as an example to make the auto-calculation system ignore these recipes.
In the game's config folder, you can find a file called appleseed_banned_recipe.json (create one yourself if it doesn't exist), then enter the following content:
{
"banned_recipes":[
"youkaisfeasts:filling/*" // You can use wildcards for batch disabling, or use full recipe IDs to disable individual recipes
]
}
This way we've disabled all filling recipes from Gensokyo Delight ~ Youkais' Feasts.
For recipes that are incompatible or items obtained through block interaction, you can fill in the craft chain or bypass problematic parts of the craft chain by writing simulated recipes.
Below is an example of a simulated recipe using Farmer's Delight's Plated Roast Chicken:
{
"type": "appleseed:simulate_recipe",
"inputs": [
{"type": "item", "id": "farmersdelight:roast_chicken_block", "count": 1},
{"type": "item", "id": "minecraft:bowl", "count": 4}
],
"outputs": [
{"type": "item", "id": "farmersdelight:roast_chicken", "count": 4}
]
}