Steps to Reproduce:
run /summon creeper;
run /execute as @e[type=!player] run data merge entity @s {AbsorptionAmount:340282350000000000000000000000000000000f};
run /kill @e[type=!player];
You can see “Killed Creeper“ but it is still alive.
Comments 3
Oops, that got cut off. The first /kill only removes the absorption, the creeper stays at full health.
LivingEntity#kill deals Float.MAX_VALUE of genericKill damage
LivingEntity#actuallyHurt still subtracts absorption from that damage. When AbsorptionAmount is also Float.MAX_VALUE, they cancel out and the health isn’t reduced.
KillCommand still records the target and sends the success message without checking if it’s dead/not.
Can confirm in 26.4 Snapshot 5. The first