New Game Rule makes mobs unkillible if not set
Mohron opened this issue ยท 4 comments
Versions
Minecraft Version: 1.12.2
Scaling Health Version: ScalingHealth-1.12-1.3.10-90
Silent Lib Version: SilentLib-1.12-2.2.16-97
Expected behavior
- Mobs should be killable no matter what
/gamerule ScalingHealthDifficulty
is set to.
Actual behaviour
A Gif if worth at least 1 Million words.
https://gyazo.com/097f44387ba48a6f96770765fdc4e5a9
- Mobs were unkillable_ish_(If a fatal blow was made, the mobs do drop loot!?!) when the gamerule was completely missing (unset) from the dimension. Once set to true, mobs gain their health and were killable. Setting the gamerule to false was not tested. This occured on a server with SpongeForge.
Steps to reproduce the problem
- Create a world without the
ScalingHealthDifficulty
set. - Try to kill mobs and fail
- Set the Game rule
- Kill mobs
Reproduced, although I'm not sure why this is happening. Will take some digging to figure out why. I don't think I even handle any entity hurt events. No errors in the log files either...
Well in theory, this only effects servers that have a mod that enables per world gamerules like Dimension Rules or SpongeForge.
No, happens with just SH/SL. I think I figured it out, but I'm out of time for today. I believe SH is constantly healing mobs because it is constantly trying to set the mob's max health, but failing because difficulty is zero. There's a safety check to consider any mob without increased health as not being processed yet. Seems that's backfiring on me. I'll try to get it fixed tomorrow.