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

Attribute "generic.maxHealth" doesn't subtract health values from players properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.17.1
    • None
    • Vanilla 1.17.1. issue is also present on vanilla 1.17.0 and OptiFine 1.17.0
    • Unconfirmed
    • (Unassigned)

      Encountering an issue when I use the "generic.maxHealth" attribute with an item in the Mainhand slot. When I add a negative value to subtract max health from a player holding it, nothing happens. I have tried doing a flat amount alongside a percentage amount (-2 for flat, -0.2 for percentage) but the issue still persists. I have also tried modifying the attribute slot to offhand and all but no success there.

      I have tried modifying the UUID to see if there was any conflict with another item, but it seems that's not the case.

      If anybody would like to see the command just in case, here it is;

      /give @p slime_ball{display:{Name:'

      {"text":"item","color":"green","bold":true,"italic":false}

      ',Lore:['

      {"text":"loreline"}

      ']},AttributeModifiers:[

      {AttributeName:"generic.max_health",Name:"generic.max_health",Amount:-.2,Operation:1,UUID:[I;1812067452,-185448233,-2039145829,-575693722]}

      ]} 1

            Unassigned Unassigned
            imraDiaNCE Jebs Spamerson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: