Skip to content

Customizing Food Groups

C4 edited this page Nov 30, 2022 · 2 revisions

The food group configuration file is located in the world save's serverconfig folder as diet-groups.toml.

Example group entry:

[[groups]]
    name = "proteins"
    icon = "minecraft:cooked_beef"
    color = "#d4781c"
    order = 0
    default_value = 0.0
    gain_multiplier = 1.0
    decay_multiplier = 1.0

Fields

name - string - The name of the food group, used for internal identifiers and localization keys

icon - string - The namespaced registry name of an item to display next to the food group

color - string - The hexcode for the color to use for the food group bar and percentage displays

order - integer - The order priority to use for the food group, higher numbers will be displayed lower

default_value - decimal - A decimal number between 0.0 and 1.0 that the food group value will start with or default to

gain_multiplier - decimal - A decimal number to multiply by the base gain amount when food is consumed for this food group

decay_multiplier - decimal - A decimal number to multiply by the base decay amount when this food group decays

Localization

The default food groups have in-built translations provided, but custom food groups will need to have their own created.

The key is: groups.diet.[custom group name].name.

Example translation entry:

"groups.diet.grains.name": "Grains",

These entries need to be placed in the localization files of a custom resource pack. For further information about creating a resource pack, please refer to this guide.

Clone this wiki locally