If true, the player can always eat this item (even when not
hungry).
抛出
This property can throw when used.
只读betaisValid
isValid:boolean
备注
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.
只读nutrition
nutrition:number
备注
表示实体在食用该物品后恢复的饥饿值,即营养值。
Represents how much nutrition this food item will give an
entity when eaten.
表示物品食物组件。当出现在物品上时,实体可以消耗此物品。 注意,只能在数驱物品上获取和使用该组件。
When present on an item, this item is consumable by entities. Note that this component only applies to data-driven items.