{
  "$id": "blockception.minecraft.item.descriptor",
  "anyOf": [
    { "$ref": "./identifier.json" },
    { "$ref": "#/definitions/object_item_descriptor" },
    {
      "type": "object",
      "properties": {
        "item": {
          "oneOf": [
            { "type": "string", "$ref": "./identifier.json" },
            {
              "type": "object",
              "$ref": "#/definitions/object_item_descriptor"
            }
          ]
        }
      }
    }
  ],
  "definitions": {
    "object_item_descriptor": {
      "title": "Item Descriptor",
      "description": "An object that describes an item.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "item": {
          "oneOf": [
            { "type": "string", "$ref": "./identifier.json" },
            {
              "type": "object",
              "$ref": "#/definitions/object_item_descriptor"
            }
          ]
        },
        "tags": {
          "type": "string",
          "$ref": "../../molang/string.json",
          "description": "[UNDOCUMENTED] A Molang expression ran against item or block to match.",
          "$comment": "UNDOCUMENTED",
          "examples": ["query.any_tag('minecraft:is_tool')"]
        },
        "item_tag": {
          "type": "string",
          "description": "[UNDOCUMENTED] A tag to lookup item or block by.",
          "$comment": "UNDOCUMENTED",
          "examples": ["minecraft:is_tool"]
        }
      },
      "examples": [{ "tags": "query.any_tag('minecraft:is_tool')" }, { "item_tag": "minecraft:is_tool" }]
    }
  }
}
