Hunger Overhaul

Hunger Overhaul

9M Downloads

HarvestCraft Coffee

reteo opened this issue · 13 comments

commented

The "Cup of Coffee" in Pam's HarvestCraft has no hunger value at all. I attempted to change this via JSON file:

{
    // a list of foods and their food values
    // these values will take precedence over HO's default values
    "foods": [
        {
            // the name of the item in "mod:name" format
            "name": "harvestcraft:coffeeItem",
            // [optional] the metadata value of the item (default: 0)
            // "meta": 0,
            // the hunger value of the item (1 hunger = 1/2 hunger bar)
            "hunger": 0.5,
            // the saturation modifier (saturation = hunger * 2 * saturationModifier)
            "saturationModifier": 0.1
        }
    ]
}

... but coffee still has no hunger value.

commented

Minimum value on hunger is "1".

There's 10 hunger icons. There's 20 hunger "points". That's why there's half-hunger icons. 20 half-hunger icons = 20 points.

The range is from 0 to 20 (no decimals).

Please close this issue when you are done confirming that it works for you when you set it to 1.

commented

Ah, must have missed this when it was first posted. Yeah, hunger does not support decimal numbers at all, and 1 hunger unit = 1/2 hunger bar (like the comment says in the .json file).

commented

Okay, I'll try it out. Does the Saturation value take decimals, or is that also whole numbers only?

commented

Saturation takes decimals.

commented

Okay, thanks for the clarification!

commented

No problem, sorry for not responding sooner.

commented

No worries. I'm laz---er, patient.

commented

Don't forget @reteo , the saturation isn't a straight-up value. It's a multiplier.

It's the hunger value you put, x2 , times the saturationmultiplier value you put.

(although I looked at the source code and couldn't find where the "x2" is. I set my carrots to 1 hunger, and saturationmultiplier of 2… and my saturation goes up by 2 when I eat a carrot. At least I think that's what I'm seeing. @squeek502

commented

Saturation has the same units as hunger (20 saturation max, 1 saturation = 1/2 saturation bar). The x2 happens in default Minecraft's FoodStats.addStats(int, float) method

Are you looking at the bars or in the F3 screen?

commented

Bars.

I could be hallucinating though, I'm pretty tired, and it only went live on our server about 30 minutes ago. I'll hit ya back if I'm still confused about it after I get some sleep and then look closer.

commented

Yeah… 2 Sat bars… = 4 Sat LOL. I just fell for the same mistake to the very question that I already answered… I'm THAT tired.

commented

It's a very convoluted system. 😄

commented

And I just finished testing it. Coffee now works like a charm!