mojira.dev
MC-312904

`/kill` fails to kill the target if it has 3.4028235E38 points of absorption.

Steps to Reproduce:

  1. run /summon creeper;

  2. run /execute as @e[type=!player] run data merge entity @s {AbsorptionAmount:340282350000000000000000000000000000000f};

  3. run /kill @e[type=!player];

  4. You can see “Killed Creeper“ but it is still alive.

Comments 3

Can confirm in 26.4 Snapshot 5. The first

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.

SekaiDorem

(Unassigned)

Community Consensus

26.3

Retrieved