Hunger Overhaul

Hunger Overhaul

9M Downloads

API request

VladoCC opened this issue ยท 3 comments

commented

Okey, @progwml6 said that I need towrite issue here to ask about api for Get Back To Home mod.
I want to get:
-Food values (hunger, saturation)
-Some way to get how exhaustion works with your mod. You changes it in some pats, right?

commented

If my mod was loaded earlier than HO, can it get values changed by HO from AppleCore API?

And is it all changes to exhaustion? I think that I saw some info about formula for speeding down exhaustion when player is low on hunger.

commented

If my mod was loaded earlier than HO, can it get values changed by HO from AppleCore API?

Yes, load order doesn't matter at all for this (or anything else AppleCore related, I believe).

And is it all changes to exhaustion? I think that I saw some info about formula for speeding down exhaustion when player is low on hunger.

Depends what you mean by exhaustion. If you mean the FoodStats.foodExhaustionLevel field, then, yes, what I linked are the only changes to how that works. If you mean 'exhaustion' as a general concept, then HO does do some other stuff like apply potion effects when the player is low on hunger/health.

commented

Food values can be retrieved using the AppleCore API (which is what Hunger Overhaul uses under the hood to modify food values):

Example:

AppleCoreAPI.accessor.getFoodValues(itemStack);

HO affects exhaustion in a few ways: