> For the complete documentation index, see [llms.txt](https://enchantedmobs.superiormc.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enchantedmobs.superiormc.cn/ultimatequest-zhong-wen-wen-dang/pei-zhi/conditions/items.md).

# 物品条件

示例写在目标或对应任务字段的 conditions 中。公共字段见[概览](/ultimatequest-zhong-wen-wen-dang/pei-zhi/conditions.md)。

## `match_item`

匹配选定物品或装备组中的任一物品。

| 字段            | 默认值             | 说明                            |
| ------------- | --------------- | ----------------------------- |
| `item`        | CONTEXT         | 标量选择器，或含 selector/holder 的节点。 |
| `item-holder` | TARGET          | 标量装备选择器的持有者。                  |
| `match`       | current section | 物品匹配规则，默认当前节点。                |

```yaml
conditions:
  tool:
    type: match_item
    item:
      selector: MAIN_HAND
      holder: PLAYER
    match:
      material:
      - IRON_PICKAXE
      - DIAMOND_PICKAXE
```

选择器为 CONTEXT、TRIGGER\_ITEM、MAIN\_HAND、OFF\_HAND、HELMET、CHESTPLATE、LEGGINGS、BOOTS、ARMOR、ALL\_EQUIPMENT。排除空气/缺失物品，装备组按 OR。CONTEXT 是事件物品，不一定为玩家主手。

## `catch_match_item`

检查钓鱼事件钓获的 Item 实体。

| 字段      | 默认值             | 说明          |
| ------- | --------------- | ----------- |
| `match` | current section | 钓获物品堆的匹配规则。 |

```yaml
conditions:
  fish:
    type: catch_match_item
    match:
      material:
      - COD
      - SALMON
      - TROPICAL_FISH
      - PUFFERFISH
```

要求 PlayerFishEvent 且钓获对象为 Item，不匹配钩住生物或空抛竿。与 trigger: fish、count: items 组合可按钓获堆数量统计。
