Scaling Health

Scaling Health

23M Downloads

New Game Rule makes mobs unkillible if not set

Mohron opened this issue ยท 4 comments

commented

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

  1. Create a world without the ScalingHealthDifficulty set.
  2. Try to kill mobs and fail
  3. Set the Game rule
  4. Kill mobs
commented

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...

commented

Well in theory, this only effects servers that have a mod that enables per world gamerules like Dimension Rules or SpongeForge.

commented

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.

commented

Well I mean, you set the game rule automatically, so most people won't forcibly unset it to have this bug appear. Either way setting the game rule in each dimension has temporarily fixed the issue.