Mrbysco / Unhealthy-Dying

Reducing your maximum health any time you die.
https://www.curseforge.com/minecraft/mc-mods/unhealthy-dying
MIT License
3 stars 2 forks source link

[Bug] Health Will Not Drop to Minimum if Other Mod Increases Health #9

Open BTRBT opened 5 years ago

BTRBT commented 5 years ago

General Info

Client Info

Issue Description

If a player's health is increased with Spice of Life: Carrot Edition, the minimum health value is applied after the increased health. That is, if your minimum health is 2 (ie: One heart) and you gain a heart from SoL, the minimum amount of health that Unhealthy Dying will subsequently reduce you to is 4 (ie: Two hearts).

Reproduce Steps

  1. Gain an extra heart from Spice of Life: Carrot Edition.
  2. Repeatedly commit suicide. Hopefully without too much pain! Oh dear!

Additional Information

Really love your mod. Keep up the great work, friend-o!

Darkmega18 commented 3 years ago

Ah, I have this issue also but it seems this is either forgotten or not done.

I have several mods that expand health and I was hoping to have this to reduce health max each time (with a loot table that drops a health increase item that can be stolen by someone else or picked up again later to get the HP back) but unfortunately the HP after it's been subtracted a certain number of times it doesn't continue subtracting health after a time I've noticed in my test world as my health continues to go up for some reason. which was when I realized the bug. :V

Mrbysco commented 3 years ago

I am guessing you're using the 1.12 version. Which hasn't gotten the rework.

Darkmega18 commented 3 years ago

Nope. 1.16.5. :V sorry, didn't realize the report was made from a 1.12.2 version. but mechanically, it is the same bug.

Mrbysco commented 3 years ago

When working with other mods that add health it becomes really easy to reduce it and the other mod suddenly taking away it's extra health. which would allow for bugs like a total health of 0 which would probably bug out.

Darkmega18 commented 3 years ago

I've actually managed to reduce health below 1 previously using scaling health. it just auto sets you to half a heart of health max. Atleast in the case of scaling health. but it had... other issues. some of which became strong compatibility issues and so I switched over to scaling the health of the player and to some degree the mobs a different way.

Mrbysco commented 3 years ago

I've recently fixed a bug which allowed negative health. For now the mod will refuse to go lower if a mod has increased your health