Mojira Archive
MCM-1863

Kill command fails to kill entities with non-integer health values, in base game versions below 1.19.0

Verification builds: 1.21.30.23, .24, .25, 1.21.40. Possibly before
Summary: Kill command fails to kill entities with non-integer health values, in base game versions below 1.19.0

Repro Steps:
https://youtu.be/yRUz_D-_IZ8
1. Download the repro world attached or generate a new world with the base game override set to 1.19.0 or below. This was tested with 1.13,1.14,1.15,1.16,1.17, and 1.18. You can also try this in any old marketplace world. (Note that you cannot retroactively apply base game version to existing worlds, they need to be generated with that setting).
2. /summon zombie ~ ~ ~
3. Hit the zombie
4. Using dev tools you can see that the health is now not a clean integer.
5. /kill @e[type=zombie]
6. Observe the zombie still lives.

NOTE: Zombies and all zombie variants have Natural Armor which is explained here. https://minecraft.wiki/w/Armor#Natural_armor
"Zombies also have a natural armor rating of 2 (🛡), giving 1.6 to 8% damage reduction from most sources."
The reason that this doesn't happen on skeletons by default, is because they don't have natural armor. If you give a skeleton damage reduction by equipping some armor, then the skeleton is affected.
The reason this happens with player damage, fire damage, explosion damage, etc, but NOT void or fall damage, is that void and fall damage is not affected by armor calculations.

Observed Results: Unless a mob is already below 1 health, any mob with a non-integer health value that is in an old marketplace world will not die with /kill. Instead they will be left with under 1 health. A second kill command will finish them off.

Expected Results: All mobs should die reliably when /kill is used. Maps depend on this being true.

Impact: Every marketplace map that uses this base game version (which is basically every map before June 2022) that relies on mobs dying using a kill command is no longer reliable. In practice, for example, in A Nightmare in Candyworld, the map no longer works because zombie villagers from previous battles are not automatically killed. It means that in the next battle, we cannot properly detect all the zombie villagers dying because some are stuck in inaccessible areas. It is safe to say that a sizeable portion of the entire marketplace catalogue is affected by this and creators haven't noticed yet because it is such a subtle issue that can have far reaching consequences.

Please watch the video for a full demonstration. Observe at the top right under "Health" "Current" you can see the actual health values of each mob.
https://youtu.be/yRUz_D-_IZ8c

Unresolved

TRS

2024-09-18, 09:10 PM

2024-09-18, 09:23 PM

1

2

Future Release, 1.21

-