Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-273311

Taking near Float.MAX_VALUE damage from mob attack through commands on hard causes NaN Absorption and Health

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w33a
    • 1.21
    • None
    • Windows 10
      Java 21.0.2 from Eclipse Adoptium
    • Confirmed
    • Commands
    • Low
    • Platform

      Steps to reproduce:

      1. Create a new world with commands enabled and in Hard difficulty.
      2. Go into survival mode.
      3. Give yourself and equip a Totem of Undying.
      4. Run this command: /damage @s 300000000000000000000000000000000000000 minecraft:mob_attack by @e[type=minecraft:zombie,limit=1,sort=nearest]
        If the command fails, find or summon a zombie then try again.
      5. Run this command: /data get entity @s AbsorptionAmount
        [Player] has the following entity data: NaNf
      6. Take damage again.
      7. Your screen will appear to constantly shake and your health bar will show as if you had 0 HP, but you still remain alive. You can still move around, break blocks, and punch entities, but you can't pick up items.
      8. Run this command: /data get entity @s Health
        [Player] has the following entity data: NaNf

      Once the bug occurs for a player, it can only be fixed by setting their Health and AbsorptionAmount to a valid number using external tools or mods; the /kill command, which normally instantly kills selected entities, won't work on such players.

            Dat12 [Mojang] etanaratsastaja
            jamesmoton James Moton
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: