Just Mob Heads (Fabric)

Just Mob Heads (Fabric)

174k Downloads

Healing Soup heals you back to 20 hearts if you have more than 20 due to other mods like Scaling Health, Etc.

ExiledMiner04 opened this issue ยท 3 comments

commented

Information

Minecraft version: 120.1
Modloader: Forge/Neoforge
(Neo)Forge version: 47.1.56
Environment: Singleplayer / Multiplayer

First mod name: Healing Soup
First mod version: 1.20.1-4.1

Second mod name: Scaling Health
Second mod version: 1.20.1-8.0.1+8

Description

When eating a soup, such as mushroom stew, when it would heal you and you have way more than 20 max hearts, you will lose all your health and be healed back to 20 hearts out of your maximum. The maximum is not removed which is good at least.

Crash report

Game doesn't crash.

commented

Are you able to reproduce this without the Scaling Health mod if you first run this command?

attribute @s generic.max_health base set 1000

Edit: The threshold appears to be 10 hearts, not 20, as 1 heart = 2 HP, and is caused by a hardcoded constant 20 here (lines 31 and 43): https://github.com/Serilum/Healing-Soup/blob/c452e57f15f8938554a6abb47f3b0b2cf6b695e0/Common/src/main/java/com/natamus/healingsoup/events/SoupEvent.java#L43
The constant should be replaced with a call to player.getMaxHealth().

commented

I was able to reproduce it with vanilla max health set to 1000.
it heals back to 20/1000 (10 hearts of the max 500) as well.

Edit: I was eating with 60 total health btw.

commented

Thank you for opening the issue, and @James103 for the solution. This has been fixed in version 4.9 of Healing Soup.

https://curseforge.com/minecraft/mc-mods/healing-soup/files