Mojira Archive
MC-97087

Attributes won't work in main hand if they were in offhand

The bug

An attribute on an item will not be effective if switched from offhand to main hand.

How to reproduce

  1. Use the following command:
    /give @s stone{AttributeModifiers:[{AttributeName:generic.movement_speed,Amount:1,UUID:[I;1,2,3,4]}]}
    
  2. Take the item in hand
  3. Press the F key once to switch the item to secondary hand
  4. Press the F key again to switch the item back to main hand
    The attribute change is no longer applied

Examples

Additional note

This allows a player to chose if he or if he doesn't want he attribute being applied.
i.e. It's not possible to create strong weapons with an attribute counterpart (-health or -speed for example) which is pretty bad for mapmakers.