mojira.dev
MC-116514

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

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.

Linked issues

Comments 0

No comments.

Skylinerw

Nathan Adams

Confirmed

advancement, durability, item

Minecraft 17w16b

Minecraft 17w17a

Retrieved