-
Bug
-
Resolution: Fixed
-
1.20.4, 24w04a, 1.20.6
-
None
-
Confirmed
-
Entities
-
Normal
-
Platform
There are several situations where the game does not check whether an entity's current health exceeds its maximum health even though it would make sense to do so. Fixing this would solve several existing issues and pre-empt many more. Below is a table of the applicable situations:
Event |
Health capped |
Notes |
---|---|---|
Take damage | By far the situation with the greatest impact on gameplay. Causes |
|
Spawn | Tracked in |
|
Unload/reload | ||
Max health modified | Sometimes | Tracked in |
Heal | Sometimes | It seems that there's no overarching heal method (or if there is, it isn't universally used), and the implementation is instead left to the effect in question. For this reason, the instant health effect will cap the value when applied to a full-health entity while the regeneration effect will not. |
Fixing this issue would make spawner NBT and /summon commands a bit nicer, since the spawned entity would be at full health if the Health field were omitted. A fix would also raise the question of whether this same logic should extend to similar issues (eg. should mobs spawned with a large scale attribute also move faster by default?) but that can be tackled another day.