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

"durability" option for item-based triggers fails for items with durability

XMLWordPrintable

    • Unconfirmed

      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 not trigger for items with durability, but will trigger for all items that do not have durability.

      Looks like the fix for MC-116514 just needs a quick NOT operator, nothing major!

            dinnerbone [Mojang] Nathan Adams
            skylinerw [Mod] Skylinerw
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: