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

"durability" option for item-based triggers succeeds for items without durability

    XMLWordPrintable

    Details

    • Confirmation Status:
      Confirmed

      Description

      Given the following advancement, placed in world/data/advancements/custom/durability.json:

      {
          "criteria": {
              "findme": {
                  "trigger": "minecraft:inventory_changed",
                  "conditions": {
                      "items": [
                          {
                              "durability": {
                                  "max": 2000
                              }
                          }
                      ]
                  }
              }
          }
      }
      

      And the following commands to test it at will:

      /advancement test @p custom:durability
      /advancement revoke @p custom:durability

      The advancement will trigger even for any items in the inventory that don't have durability, such as books or iron ingots. The expected behavior is to only trigger for items that have durability, such as armor, tools, and weapons.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dinnerbone [Mojang] Nathan Adams
                Reporter:
                skylinerw [Mod] Skylinerw
              • Votes:
                3 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: