If the void worm has attribute modifiers for its max health, we use the
modified value to set the base health value, and so if the attribute
gets reapplied by a mob leveling mod this can result in the modifier
compounding (e.g. for the real example encountered that motivates this
fix, if the initial worm has a 4x modifier on its max health then the
new split worm will inherit half the quadrupled health as its base
health, which when the 4x modifier is applied on top of that gives
double the health of the first worm, giving exponential growth for the
health of the worms).
Switch to using the base value instead as the input, clarify that we're
setting the base value and adjust the healing implementation to ensure
we heal by the full amount, not the base amount.
If the void worm has attribute modifiers for its max health, we use the modified value to set the base health value, and so if the attribute gets reapplied by a mob leveling mod this can result in the modifier compounding (e.g. for the real example encountered that motivates this fix, if the initial worm has a 4x modifier on its max health then the new split worm will inherit half the quadrupled health as its base health, which when the 4x modifier is applied on top of that gives double the health of the first worm, giving exponential growth for the health of the worms).
Switch to using the base value instead as the input, clarify that we're setting the base value and adjust the healing implementation to ensure we heal by the full amount, not the base amount.