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

Attribute modifiers with the same ID are incorrectly removed when one of the items is unequipped

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.6, 1.21 Pre-Release 1, 1.21, 24w40a, 1.21.3
    • None
    • Confirmed
    • Commands, Items
    • Normal
    • Platform

      Equipping two items with an attribute modifier of the same ID and affected attribute and unequipping one of them removes the modifier even when the other item is still equipped.

      How to reproduce:

      1. Execute the following command: 
        /give @s carved_pumpkin[attribute_modifiers={modifiers:[{type:"movement_speed",id:"speedy",operation:"add_value",amount:1d,slot:"any"}]}] 2
      2. Make sure the pumpkins are not selected in your hotbar, then put one of the pumpkins on your head.
        You will have the speed effect, as intended.
      3. Now scroll past the other pumpkin in your hotbar.
        As soon as you unselect the pumpkin in the hotbar, the speed modifier will be removed, even though the pumpkin is still on your head.

      Expected result:

      An attribute modifier would still be present even after unequipping one item with the modifier but keeping another.

      Observed result:

      An attribute modifier is removed after unequipping one item with the modifier, even if another item with the modifier is still equipped.

            Unassigned Unassigned
            42Richtofen42 42Richtofen42
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: