跳转至

Food

文档版本:1.21.0.24

When an item has a food component, it becomes edible to the player.

架构

minecraft:food:
{
  boolean "can_always_eat" : opt
  number "nutrition" : opt
  number "saturation_modifier" : opt
  string "using_converts_to" : opt
}
can_always_eatboolean
If true you can always eat this item (even when not hungry), defaults to false.
nutritionnumber
How much nutrition does this food item give the player when eaten.
saturation_modifiernumber
Saturation Modifier is used in this formula: (nutrition * saturation_modifier * 2) when appling the saturation buff. Which happens when you eat the item.
using_converts_tostring
When used, convert the this item to the one specified by using_converts_to.