minecraft:exhaustion_values for you with a switch.Get GodCraftOverview
minecraft:exhaustion_values is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Sets how much each player action drains the hunger bar. Lower values make players get hungry more slowly; set one to 0 to make that action free.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
heal | number | 6 | Exhaustion added when health regenerates from a full hunger bar. |
jump | number | 0.05 | Exhaustion added for each normal jump. |
sprint_jump | number | 0.2 | Exhaustion added for each jump while sprinting. |
mine | number | 0.005 | Exhaustion added for each block mined. |
attack | number | 0.1 | Exhaustion added for each attack. |
damage | number | 0.1 | Exhaustion added when taking damage. |
walk | number | 0 | Exhaustion added while walking. |
sprint | number | 0.01 | Exhaustion added while sprinting. |
swim | number | 0.01 | Exhaustion added while swimming. |
lunge | number | 4 | Exhaustion added when the lunge enchantment triggers, multiplied by its level. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:exhaustion_values": {
"heal": 6,
"jump": 0.05,
"sprint_jump": 0.2,
"mine": 0.005,
"attack": 0.1,
"damage": 0.1,
"walk": 0,
"sprint": 0.01
}
}