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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • 1.20.5 Pre-Release 1
    • None
    • Java 21.0.2
      Windows
    • Unconfirmed
    • (Unassigned)

      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

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

              Created:
              Updated:
              Resolved: