[ANGRY PIXEL] The Betweenlands

[ANGRY PIXEL] The Betweenlands

24M Downloads

[1.12.2] Health lost via Decay affects health directly instead of using a Health Modifier. Causes the Health Bar to act weird.

SonicX8000 opened this issue ยท 2 comments

commented

Minecraft: 1.12.2
Forge: 14.23.5.2814

Mods: 3
ScalingHealth-1.12.2-1.3.33+135
SilentLib-1.12.2-3.0.13+167
TheBetweenlands-3.4.6-universal

The health lost via the Decay should use a health modifier instead of altering the vanilla's max health as this sorta causes the health to glitch out in this GIF Link if paired with scaling health.

https://cdn.discordapp.com/attachments/377171551155650560/560254558186635283/betweenlanddecayhealthbug.gif

Unsure if you're able to see it but if the Decay used a health modifier it'll show in Scaling Health's Debug Info in the upper left corner of the screen. As my max health lowers my health acts weirdly and it also shifts scaling health's health modifier since it's reading the vanilla max health being lowered which... leads to some weird things.

I recall the Cyclic mod having this issue when their Health Increase item did this sort of thing and it was fixed when it was made into a health modifier instead of applying the health boost directly.

commented

Pretty sure there was a reason why I didn't use an attribute modifier, but that was quite a while ago so I can't quite remember why (maybe the order in which attributes are applied?). I'll look into it and check if an attribute modifier works better.

commented

It would be better compatibility with other mods that uses attribute modifiers and it shouldn't cause problems if it was mixed with other attributes as it will add/subtract the values. I think it also allows you to use a percentage scale depending on the operation that's used for the attribute.


Here's an example. Those attribute modifiers listed here sets my max health to 30.0. If Decay uses an attribute which uses -2.0, up to a max of -14.0 since that's being used currently with the Decay as it lowers. My health total will be 16.0. If the Decay Bar is refilled then the Decay attribute will will go back to 0.0 which sets my health back to 30.0.

The -10.0 amount is due to scaling health allowing you to altar your starting health with an attribute, that is... if vanilla health is at the default 20. It causes the bug to occur if vanilla health was touched. So even if Decay has -14.0 and I increase my health via scaling health which affects only the attribute that scaling health uses... my health will then be at 26.0 while the scaling health attribute while show as 0.0. Restoring the Decay Bar back to full will set decay attribute to 0.0, thus my health goes to 40.0.