You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is no way I know of to get the hunger value of a food item, nor is there a way to query its saturation modifier.
A current workaround is to hardcode all hunger and saturation values of all edible foods, but that does not scale well with modded food items.
To fix this, I would like to suggest the following two functions (names subject to change):
item_hunger(item)
Returns the hunger value of the given item, or null if it is not a food item.
item_saturation_mod(item)
Returns the saturation modifier of the given item, or null if it is not a food item.
(The return value null can be substituted with 0 if necessary).
The text was updated successfully, but these errors were encountered:
Currently, there is no way I know of to get the hunger value of a food item, nor is there a way to query its saturation modifier.
A current workaround is to hardcode all hunger and saturation values of all edible foods, but that does not scale well with modded food items.
To fix this, I would like to suggest the following two functions (names subject to change):
item_hunger(item)
Returns the hunger value of the given item, or
null
if it is not a food item.item_saturation_mod(item)
Returns the saturation modifier of the given item, or
null
if it is not a food item.(The return value
null
can be substituted with0
if necessary).The text was updated successfully, but these errors were encountered: