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

Attribute modifiers don't stack properly.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.21
    • None
    • Unconfirmed
    • (Unassigned)

      I was making custom items with commands when I discovered that specific attributes (like the max health and movement speed attributes) didn't stack.
      I made two pieces of armor that were originally supposed to increase your max health by 5 additional hearts, the first piece giving 2 additional hearts and the second giving 3.
      Instead, I only got the effects from the most recently worn armor piece. If I wore the first piece last, I would only get its additional hearts while the other piece gave nothing, and vice versa. 
      I checked the UUIDs and they are not the same.

      Commands used for the items:
      /give @p leather_helmet[attribute_modifiers=[

      {id:"max_health",type:"generic.max_health",amount:4,operation:"add_value",slot:"head"}

      ]] 1
      /give @p leather_boots[attribute_modifiers=[

      {id:"max_health",type:"generic.max_health",amount:6,operation:"add_value",slot:"feet"}

      ]] 1
      These items were both worn in survival.

            Unassigned Unassigned
            Leader Leader
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: