Mojira Archive
MC-270731

Shield does not lose durability when being edited by an item modifier

Set up

Run this command every tick from a mcfunction or a command block:

execute as @a run item modify entity @s hotbar.0 example:my_item_modifier

with this content inside the item modifier file my_item_modifier.json:

 

[
    {
        "limit": {
            "min": 0,
            "max": 1
        },
        "function": "minecraft:limit_count"
    }
]

Note: this also works for a pretty much empty my_item_modifier.json file:

 

 

[
    
]

 

Testing the bug

  1. Give yourself a shield
  2. Place it inside the first slot of the hotbar (leftmost one)
  3. Summon a skeleton
  4. Block an arrow with a shield
  5. See the durability of the shield not being affected

 

Additional notes

  • The bug seems to appear no matter the damage source (a zombie hit, a creeper explosion, etc.)
  • Other items such as bows, crossbows, or tools (pickaxe, axe, etc.) seem to lose durability normally when inside the modified slot, only the shield seem to be affected

Cannot Reproduce

FaderJosh

2024-04-13, 05:19 PM

2024-04-14, 09:28 AM

2024-04-14, 01:56 AM

0

1

Unconfirmed

(Unassigned)

1.20.5 Pre-Release 1

-