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

Abnormal behavior related to the generic.max_health attribute

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.16.1, 1.16.2 Pre-release 1
    • None
    • Unconfirmed
    • (Unassigned)

      After reducing the attribute generic.max_health of a player, the player's HP will not be capped automatically until taking damage. If the value of generic.max_health is lower than half of the original HP, "client-side fake death" will happen.

      Steps to reproduce:

      1. Reset the player's state

      /attribute @s minecraft:generic.max_health base set 20
      /effect give @s minecraft:instant_health 1 3
      

      2. Modify the attribute

      /attribute @s minecraft:generic.max_health base set 6
      

      3. Check current HP

      /data get entity @s Health
      

          The result is 20, not 6
      4. Take any damage
          For example, step onto a magma block. After taking damage, the player's HP will be 5 and the "You Died" UI will pop up.

            Unassigned Unassigned
            d291623 Yui
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: