Minecraft Wiki
Advertisement
    •  count: Test the number of items in this item stack. Use an integer to test for a single value. Use an object with min and max keys to test for a range of values (inclusive).
      •  max
      •  min
    •  durability: Test the durability of the items in this stack, represented by the number of uses remaining (not number of uses consumed). Use an integer to test for a single value. Use an object with min and max keys to test for a range of values (inclusive).
      •  max
      •  min
    •  enchantments: Test the enchantments on the items in this stack. To pass, all items within the list must be satisfied by at least one enchantment on the item that matches.
      • : A single enchantment to test for.
        •  enchantment: The enchantment ID to test for.
        •  levels: The level(s) of enchantments that can satisfy this condition. Use an integer to test for a single value. Use an object with min and max keys to test for a range of values (inclusive).
          •  max: The maximum value.
          •  min: The minimum value.
    •  stored_enchantments: To test for stored enchantments on an enchanted book.
      • Follows same format as  enchantments above.
    •  items: Test the type of item in the item stack. Accepts a list of item IDs. Passes if the item's ID matches any of the listed values.
    •  nbt: Test for any other NBT tags that may be present on the item. The outer braces of the NBT { } must be present within this string. Additional care is required if the NBT contains quotation marks " ", as they must be escaped with a backslash \".
    •  potion: Test the type of potion this item is. Uses minecraft:empty if the item is not a potion. Accepts a brewed potion ID.
    •  tag: Test if the item ID of this item is listed within a data pack item tag. Accepts the resource location of a valid item tag.
Advertisement