-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the wiki for A Balanced Diet!
A Balanced Diet is a fork of the Diet mod, which facilitates the creation and management of dietary food groups in Minecraft. The mod is highly configurable; users and modpack developers can define their own food groups, classifications, diet effects, notifications, etc. A Balanced Diet can be downloaded on Modrinth or CurseForge.
Food groups are custom dietary groups that represent the types of food that you have eaten. Each group has a value ranging between 0% and 100% depending on how much of that particular category a player has eaten. These values increase depending on what types of food a player eats and every group gradually decays when the player uses up their hunger bar. Dietary effects are custom rewards or penalties applied to players based on certain, configurable food group values.
This fork was created to add some additional clarity, balance, and quality of life features. These new features are almost entirely optional and data-driven, and include a notification system for crossing specified thresholds, quality overlays to the diet bars that show what thresholds start providing positive or negative effects, and per-food nutrition definition.
- Customizing Food Groups explains how to create and customize food groups.
- Categorizing Food to Groups explains how to assign foods to food groups using tags.
- Setting Food Values explains how to set specific food group values for individual foods.
- Customizing Diet Suites explains how to create and customize diet suites and the effects they provide.
- Example Datapack reviews an example datapack that adds a new food group, adds it to the default diet suite, and assigns a food to it.
Please report all bugs, issues, and feature requests using the issue tracker on the mod's GitHub page. Please do not make issues on the original mod's GitHub page for features only present in this fork.
If preferred, I am active in the Discord server for my current modpack, Desolate Planet. Feel free to ping me there and I should respond when able.
A Balanced Diet is configured through data files, loaded with a datapack. If you are already familiar with datapacks, I recommend skipping to one of the pages above. If you are unfamiliar with datapacks, the information below will be necessary to configure datapacks for A Balanced Diet.
For information not covered on this page, I recommend reviewing the datapacks page and this tutorial on the Minecraft Wiki.
Create your root datapack folder and name it anything you'd like. In that folder, create a file named pack.mcmeta and put the following text into it:
{
"pack": {
"pack_format": 15,
"description": "put a description here, or not"
}
}In that folder, create a folder named data. All data files should be placed inside a namespace folder in the data folder. For example, food groups would go in data/[namespace]/diet/groups/. The rest of this wiki details how to make each type of A Balanced Diet's data files.
Note
[namespace] should be replaced by the namespace chosen for this portion of the datapack. If this is part of a mod, the namespace is usually the mod ID. If this is part of a user-defined datapack, the namespace can be any lowercase string with no special characters.
The .mcmeta file and .json files can be opened and edited in any text editor, such as Notepad.
In vanilla Minecraft, datapacks are per-world and need to be placed in the datapacks folder of a world folder. Find this folder by navigating to your Minecraft root folder and opening the saves folder. Select one of your world saves from that, navigate to datapacks, and place the datapack folder you made inside. The full path would look something like [minecraft-root]/saves/[world-name]/datapacks/[datapack-name].
The datapacks placed in this folder are enabled by default upon loading the world. After modifying them, reopen the world or run the /reload command to load any new changes.
Datapacks can be loaded for an entire Minecraft instance using a mod with data loading capabilities, such as KubeJS or Open Loader. I recommend using one of these options when using A Balanced Diet in a modpack to ensure all players load your configuration automatically.