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

After upgrading to 1.21, only the last attribute_modifier with the same UUID will be kept

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 1.21
    • None
    • Confirmed
    • Datafixer

      After updating to 1.21, if the custom attribute_modifiers of an item have the same UUID, only the last one will be retained.

      How to reproduce:

      1. Create a world in 1.20.6
      2. Run the following command: 
        /give @p minecraft:diamond_sword[minecraft:attribute_modifiers={modifiers:[{name:"a",uuid:[I;1683709482,44580970,-1540485464,1994649380],amount:6,operation:add_value,slot:mainhand,type:"minecraft:generic.attack_damage"},{name:"a",uuid:[I;1683709482,44580970,-1540485464,1994649380],amount:-2.4,operation:add_value,slot:mainhand,type:"minecraft:generic.attack_speed"}]}]
      3. Observe the attribute_modifiers of the item:
        → +6 attack damage -2.4 attack speed
      4. Upgrade the world to 1.21
      5. Observe the attribute_modifiers of the item:
        → -2.4 attack speed
      6. Run the command:
        /give @p minecraft:diamond_sword[minecraft:attribute_modifiers={modifiers:[{id:"minecraft:645b5e2a-02a8-406a-a42e-0ea876e3ef24",amount:6,operation:add_value,slot:mainhand,type:"minecraft:generic.attack_damage"},{id:"minecraft:645b5e2a-02a8-406a-a42e-0ea876e3ef24",amount:-2.4,operation:add_value,slot:mainhand,type:"minecraft:generic.attack_speed"}]}]

        → Both attribute_modifiers appear, indicating that using the same ID is allowed.

            Unassigned Unassigned
            Kirby46994 beebee
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: