-
Notifications
You must be signed in to change notification settings - Fork 39
Effects
Effects are customizable potion effects that are applied based on nutrition levels. They are applied if all the conditions of the effect are met.
Any potion that has been registered in the potion registry may be used. For instance, hungeroverhaul:wellfed
can be used if the Hunger Overhaul mod is loaded. The amplifier
field determines the strength of the potion.
Each effect specifies conditions which must be met for the potion to be applied. The required nutrients must be within the threshold (between minimum
and maximum
values), and the effect must be enabled.
The detect
field offers various modes to check against nutrition levels. detect=any
, for instance, will apply the potion effect if any nutrient is within the threshold.
Cumulative mode will increase the potion's amplifier for each nutrient within the threshold. It will be increased by the value defined in cumulative_modifier
.
Particle visibility can be configured by the particles
field. Accepted values are transparent
, translucent
, and opaque
. The latter two options also include a small potion status indicator on-screen. Translucent particles use the softer beacon particle effect. The default value is transparent.
nutrients
provides a list of nutrient IDs which the detection mode will check against. If omitted, all nutrients will be included.
Effects are defined in the /config/nutrition/effects
directory. Each .json file defines a new effect.
{
"name": "example", // Unique Effect ID
"potion": "minecraft:strength", // Potion's resource location (eg. fire_resistance)
"amplifier": 0, // Potion strength
"minimum": 75, // Minimum nutrition level to take effect
"maximum": 100, // Maximum nutrition level to take effect
"detect": "any", // Detection type. Accepted values:
// 'any': Any nutrient may be in the threshold
// 'average': The average of all nutrients must be in the threshold
// 'all': All nutrients must be in the threshold
// 'cumulative': For each nutrient within the threshold, the amplifier increases by one
"nutrients": [ // A whitelist of nutrient IDs to detect against
"fruit", // If this field is omitted, then all nutrients will be included
"vegetable" //
], //
"cumulative_modifier": 1, // Amount to increase the amplifier by for each cumulative effect
"particles": "transparent", // Particle visibility: 'transparent' (default), 'translucent', or 'opaque'
"enabled": false // Will this effect be active or not
}
The name
, potion
, minimum
, maximum
, and detect
fields must be specified.