Nourished uses datapacks for food classifications, nutrient definitions, effects, and other nutrition data. Datapacks let modpack authors and server owners change this data without modifying the mod.
๐ Where Files Go
Nourished-specific datapack resources generally go under:
data/<pack_namespace>/nourished/<resource_type>/<file>.json
For example:
data/my_pack/nourished/source_classifications/starfruit.json
Item tags use a different path: the tag's namespace determines its directory. Nourished's built-in nutrient tags are in the nourished namespace:
data/nourished/tags/item/nutrients/<nutrient>.json
๐ท๏ธ Add Foods with Nutrient Tags
To add items to a built-in nutrient tag, add a standard Minecraft item-tag file. For example, to classify two items as fruits, add or extend:
data/nourished/tags/item/nutrients/fruits.json
{
"replace": false,
"values": [
"mymod:starfruit",
"mymod:dragonfruit"
]
}
Use a registered nutrient key for the tag name, such as fruits, vegetables, proteins, grains, or dairy. Tags can also reference other item tags with a # prefix.
See Community Tags for more tag guidance.
๐ฅ Explicit Source Classifications
Use a source classification when you want to directly map an item or tag to a nutrient instead of relying on scanner inference.
Path:
data/<pack_namespace>/nourished/source_classifications/<name>.json
Map an item
{
"marie_schema_version": 1,
"value_key": "fruits",
"item": "mymod:starfruit",
"amount": 1.0
}
Map a tag
{
"marie_schema_version": 1,
"value_key": "proteins",
"tag": "mymod:foods/cooked_meat",
"amount": 1.0
}
Use an existing nutrient key or a nutrient registered by your datapack or another integration. Explicit source classifications are used ahead of scanner guesses for those items.
๐งช Define a Custom Nutrient
Path:
data/nourished/config/nutrients.json
Example:
{
"key": "spices",
"display_name": "Spices",
"color": "0xFFE07A5F",
"default_decay_rate": 0.0005,
"critical_threshold": 0.1,
"low_threshold": 0.25,
"excess_threshold": 0.9,
"beneficial": true,
"icon": "minecraft:spider_eye",
"tags": ["nourished:nutrients/spices"]
}
The key supplies the nutrient ID. Nutrient definitions can then be used by classifications, effects, and other nutrition data. A definition does not assign food items; use a matching item tag or source classification for that. See Custom Nutrients for config, datapack, KubeJS, bar-color, and tooltip options.
โจ Add or Change an Effect
Path:
data/<pack_namespace>/nourished/effects/<name>.json
Example:
{
"marie_schema_version": 1,
"value_key": "proteins",
"threshold": 0.25,
"threshold_type": "LOW",
"effect_id": "minecraft:weakness",
"amplifier": 0,
"duration": 140
}
Threshold types include LOW, CRITICAL, EXCESS, and BONUS. Effects use ticks for duration; 20 ticks equal one second.
๐ Compatibility Data
Compatibility resources can describe a mod and provide item-to-nutrient mappings.
Path:
data/<pack_namespace>/nourished/compat/<name>.json
Example:
{
"marie_schema_version": 1,
"mod_id": "mymod",
"category": "SOURCE_MOD",
"mappings": {
"mymod:starfruit": "fruits",
"mymod:protein_bar": "proteins"
}
}
For more information about the compatibility system, see MariesLib Commands & Integrations.
๐ Module Locks
Server owners can lock settings or make them server-only with a module-lock resource:
data/<pack_namespace>/nourished/module_locks/<name>.json
Example:
{
"marie_schema_version": 1,
"locked": [
"enableEffects",
"enableDecay"
],
"server_only": [
"enableSynergies",
"enableMilestones"
]
}
lockedprevents the listed settings from being changed through the client configuration screen.server_onlymarks the listed settings as server-authoritative.
๐ Reload and Validate
After adding or changing datapack files, run:
/reload
Use Nourished's diagnostics command to check datapack validation:
/nourished diagnostics
For classification troubleshooting, inspect the item with:
/nourished debug held