false health altering on login
Kenshij opened this issue · 5 comments
Versions
Minecraft Version: 1.12
Scaling Health Version: 1.12-1.3.11-91
Silent Lib Version: 1.12-2.2.16-97
Expected behavior
- after login same health level, like logout
Actual behaviour
- have over "max_health" entry, logout and the relog back to the world, health ist at "max_health" entry and not at the "health" entry saved and starts sucking hunger to go to previous "health" entry
Have looked into the ntb data and manipulated it to track the source, its the "max_health" entry from this mod. If other mods alter the health this mod seems to set the health on login to its "max_health" entry instead of let them like it was, even the right health is saved in the "health" entry.
Please don't alter the health on login.
in File
ScalingHealth/common/net/silentchaos512/scalinghealth/event/ScalingHealthCommonEvents.java
Line 198 and 199
if (health > maxHealth && maxHealth > 0)
player.setHealth(maxHealth);
Function public void onPlayerJoinedServer(PlayerLoggedInEvent event)
is the source of the problem in the code
Cyclic is such a mod, it has some own ntb data and an player attribute what gives bonus health on eating heath container from this mod.
After more testing and working on a workaround, its not cyclic ist another mod Nutrient, adds an buff Thoughness wich gives 20 healths, is registered in attribute modifiers.
Whats the purpose of hard setting the players health back to the mods own saved max health value on login, when the players health value is over the mods max value ?
The player must have archived somehow to get over your modded max value and thats nor a problem nor a mistake. But its only my oppinion that the lines that prevent this are obsolate ^^''