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

Attribute command can't set current health to half a heart which leads to other issues

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.16 Release Candidate 1
    • None
    • OS: Windows 10
      Java: Version 8 Update 241 (build 1.8.0_241-b07)
    • Unconfirmed
    • (Unassigned)

      If you set your max health to 1 with the attribute command, your current health is only lowered to 2 (a full heart) while your max health is set to 1 (a half heart). If you take half a heart of damage from falling 4 blocks, you will be at half a heart and will not regenerate to a full heart. The next part might be a different bug: if you apply poison to yourself after setting your max health to 1, you are shown the death screen but you don't "die." Your health displays as half a heart, you do not drop any items even if keepInventory is off, and clicking respawn only removes the death screen and does not do anything else it normally does when respawning. For instance, it doesn't set your health back to normal and it doesn't teleport back to your spawn point.

       

      Steps to reproduce (Note: for the second part, you have to type /kill before doing steps 2-4):

      1. Create a new survival world with cheats enabled
      2. Run this command: /attribute @s minecraft:generic.max_health base set 1
      3. Your health will be at 2 (a full heart)
      4. (The second part) Run this command: /effect give @s minecraft:poison 1 3
      5. (After examining the death screen) Click the "Respawn" button

            Unassigned Unassigned
            Acrisius Acrisius
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: