When an item is eaten, this value is used according to this
formula (nutrition * saturation_modifier * 2) to apply a
saturation buff.
抛出
This property can throw when used.
只读实验性typeId
typeId:string
备注
Identifier of the component.
只读实验性usingConvertsTo
usingConvertsTo:string
备注
若给出,则使用时将该物品转换为标识符指定的物品。
When specified, converts the active item to the one
specified by this property.
抛出
This property can throw when used.
静态只读实验性componentId
componentId:"minecraft:food" = 'minecraft:food'
方法
isValid
isValid(): boolean
实验性
返回 boolean
Whether the component is valid.
备注
Returns whether the component is valid. A component is
considered valid if its owner is valid, in addition to any
addition to any additional validation required by the
component.
表示物品食物组件。当出现在物品上时,实体可以消耗此物品。 注意,只能在数驱物品上获取和使用该组件。
When present on an item, this item is consumable by entities. Note that this component only applies to data-driven items.