Item Documentation - minecraft:food
minecraft:food
sets the item as a food component, allowing it to be edible to the player.
Important
The minecraft:food
must have the minecraft:use_modifiers
component in order to function properly.
Parameters
Name | Default Value | Type | Description |
---|---|---|---|
can_always_eat | false | Boolean | If true you can always eat this item (even when not hungry). |
nutrition | 0 | Integer | The value that is added to the actor's nutrition when the item is used. |
saturation_modifier | 0.6 | Float | Saturation Modifier is used in this formula: (nutrition * saturation_modifier * 2) when applying the saturation buff. |
using_converts_to | Not used by default. | JSON object | When used, converts to the item specified by the string in this field. |
See Custom Item Use Priority for more information on use behavior.
Example
"minecraft:food":{
"can_always_eat": false,
"nutrition" : 3,
"saturation_modifier": 0.6,
"using_converts_to": "bowl"
}
Vanilla examples
Vanilla items using minecraft:food
- apple
- appleEnchanted
- baked_potato
- beef
- beetroot_soup
- beetroot
- bread
- carrot
- chicken
- chorus_fruit
- clownfish
- cooked_beef
- cooked_chicken
- cooked_fish
- cooked_porkchop
- cooked_rabbit
- cooked_salmon
- cookie
- dried_kelp
- fish
- golden_apple
- golden_carrot
- honey_bottle
- melon
- mushroom_stew
- muttonCooked
- muttonRaw
- poisonous_potato
- porkchop
- potato
- pufferfish
- pumpkin_pie
- rabbit_stew
- rabbit
- rotten_flesh
- salmon
- spider_eye
- suspicious_stew
- sweet_berries