Mojira Archive
MC-268850

Attribute Modifier: Not updated when switching items in hotbar

When switching between two items in the hotbar, each with different "Attribute Modifier" values, the modification does not update correctly.

Steps to Reproduce:
1. Get two items in the hotbar with the same attribute (e.g "generic.scale").

  • The first item has an "Attribute Modifier" value of 1.0.
  • The second item has an "Attribute Modifier" value of 100.0.
    2. Select the first item to apply the scale effect.
    3. Directly select the second item.

Expected Result:
The scale modification from the first item should be replaced by the scale effect of the second item

Actual Result:
Despite switching items in the hotbar, the scale value remains that of the first item; the scale effect is still applied but with the incorrect value.

// First Item
/give @s minecraft:iron_axe[attribute_modifiers={modifiers:[{type:'minecraft:generic.scale',uuid:[1,2,3,4],slot:"mainhand",name:'Big!',amount:100.0,operation:'add_multiplied_base'}]}]

// Second Item
/give @s minecraft:iron_axe[attribute_modifiers={modifiers:[{type:'minecraft:generic.scale',uuid:[1,2,3,4],slot:"mainhand",name:'Big!',amount:1.0,operation:'add_multiplied_base'}]}]

Fixed

Hardel

[Mojang] Gegy

2024-02-28, 08:09 PM

2024-03-05, 12:19 PM

2024-03-05, 12:19 PM

3

4

Community Consensus

Very Important

Platform

Commands, Items

24w09a

24w10a