Overloaded Armor Bar

Overloaded Armor Bar

33M Downloads

Armor Bar draws over extra hearts from Health Boost

juliand665 opened this issue ยท 13 comments

commented

Vanilla has a health boost effect which gives you extra hearts (e.g. from the enchanted golden apple). While you seem to handle absorption correctly, when health boost hearts remain without absorption hearts, the armor bar is not moved up as it should be. This also causes incompatibility with SoL: Carrot since we increase the max health. Here's what it looks like after /effect give @s minecraft:health_boost 3:

screenshot of overlaid health bar

commented

mc version?

commented

right, sorry: 1.14.4 (mod 3.0.0)

commented

I'm sorry to report this is definitely still happening in 3.0.0aโ€ฆ I could send a screenshot but it'd be identical. Here's the person who initially reported the issue re-reporting it, too.

Also, huh, looks like I can't reopen the issue? I always thought that was possible.

commented

There is a config option for working around this already, the fix was making it account for healthboost changing the max hunger
image
That needs to be set to true in order to enable offset because I assume most people have mods like COlorful Health bar or others that change the rendering of the hearts.

commented

I see; you can't exactly check how the hearts are being rendered lol

Perhaps you could make that option true by default and force it to false when one of a list of mods making the health bar 1-high is active (e.g. colorful health bar or your very own classic bars)?

commented

I tried that, it quickly because a clusterfuck, so instead I default it to false because 99% of people have something that alters the hearts, *cough Mantle, so that it can be manually edited in case of mods I didn't account for.

commented

Interesting though; how does mantle avoid vanilla rendering the armor bar higher and can't you somehow hook into the same place to take over that offset?

commented

Ah nice, so how come you can't just use ForgeIngameGui.left_height to determine how high to draw?

commented

Yet another thing I didn't know existed.
If it works that means less code, slightly faster rendering and one less config option to worry about

commented

For what it's worth, I didn't know about it either until I looked at that part of Mantle's code you just posted to figure out how they actually manage the offset lol

I'd assume the vanilla armor bar is patched to use it though, no?

commented

Yeah, forge patches vanilla to use it.

commented

Making another release to patch this once and for all.