AppleSkin

AppleSkin

241M Downloads

[1.12.2, Bug] Graphical glitch with high exhaustion values.

yeelp opened this issue ยท 7 comments

commented

When a player has a really high exhaustion value that exceeds their max exhaustion, AppleSkin draws the following graphical glitch to the bottom left of the screen.
exhaustbad

This can occur in vanilla even with the maximum exhaustion value being capped at 40. However, with AppleCore now being able to change this exhaustion cap as of version 3.4.0, this graphical bug will probably occur more frequently as modders experiment with it.

The solution as far as I see is to clamp the ratio float right here

float ratio = exhaustion / maxExhaustion;
to never be greater than 1 (unless there's a specific reason it's unbounded), as I presume the texture just wraps around if the length of the texture exceeds the length of the texture map.

I haven't checked the other branches for the different AppleSkin versions, but I imagine this occurs in all the other versions. I can double check and open a PR patching this for 1.12.2. I'm embarrassed to say my knowledge with Git isn't as expansive as I'd like it to be, so I don't know if it's possible to open a PR that will patch all branches simultaneously (I suspect not).

commented

Finally got new versions released, sorry for the delay.

commented

I'm still willing to support older versions, the best thing to do is to create a PR against the default branch and then I'll merge it through to the other branches.

(note: no need to mess with your current PRs @LordMZTE, this is just for future reference)

commented

its sadly not possible to open a pr for multiple branches, also i doubt that the 1.12 versions will be updated. modders are moving on to 1.15

commented

i'll work on a fix for this and create a pr

commented

its sadly not possible to open a pr for multiple branches, also i doubt that the 1.12 versions will be updated. modders are moving on to 1.15

Thanks for the clarification.

commented

Alright, it was just that one of my prs accidentally contained some half finished code so in case you wouldn't merge my other one you could wind up with some bugs

commented

Fixed by #70, see #70 (comment)