{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/minecraft-data-pack-predicate/latest.json",
  "title": "Minecraft Data Pack Predicate",
  "description": "Configuration file defining a predicate for a data pack for Minecraft.",
  "x-lintel": {
    "source": "https://www.schemastore.org/minecraft-predicate.json",
    "sourceSha256": "9d7a955017e43a8b604527f5200752120a629c98b3fff156f2a5c814c07ccac2",
    "fileMatch": [
      "**/data/*/predicates/*.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "object",
  "properties": {
    "conditions": {
      "title": "Conditions",
      "description": "The condition's ID.",
      "type": "string",
      "enum": [
        "minecraft:alternative",
        "minecraft:block_state_property",
        "minecraft:damage_source_properties",
        "minecraft:entity_properties",
        "minecraft:entity_scores",
        "minecraft:inverted",
        "minecraft:killed_by_player",
        "minecraft:location_check",
        "minecraft:match_tool",
        "minecraft:random_chance",
        "minecraft:random_chance_with_looting",
        "minecraft:reference",
        "minecraft:survives_explosion",
        "minecraft:table_bonus",
        "minecraft:time_check",
        "minecraft:weather_check",
        "minecraft:value_check"
      ]
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:alternative"
          }
        }
      },
      "then": {
        "properties": {
          "terms": {
            "title": "Terms",
            "description": "A list of conditions to join using 'or'.",
            "type": "object"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:block_state_property"
          }
        }
      },
      "then": {
        "properties": {
          "block": {
            "title": "Block",
            "description": "A block ID.",
            "type": "string"
          },
          "properties": {
            "title": "Properties",
            "description": "A map of block property names to values.",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:damage_source_properties"
          }
        }
      },
      "then": {
        "properties": {
          "predicate": {
            "$ref": "#/$defs/tagsCommonToAllDamageTypes",
            "title": "Predicate",
            "description": "Predicate applied to the damage source."
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:entity_properties"
          }
        }
      },
      "then": {
        "description": "Test properties of an entity.",
        "properties": {
          "entity": {
            "title": "Entity",
            "description": "Specifies the entity to check for the condition.",
            "type": "string",
            "enum": [
              "this",
              "killer",
              "killer_player"
            ]
          },
          "predicate": {
            "$ref": "#/$defs/tagsCommonToAllEntities",
            "title": "Predicate",
            "description": "Predicate applied to entity."
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:entity_scores"
          }
        }
      },
      "then": {
        "description": "Test the scoreboard scores of an entity.",
        "properties": {
          "entity": {
            "title": "Entity",
            "description": "Specifies the entity to check for the condition.",
            "type": "string",
            "enum": [
              "this",
              "killer",
              "killer_player"
            ]
          },
          "scores": {
            "title": "Scores",
            "description": "Scores to check. All specified scores must pass for the condition to pass.",
            "type": "object",
            "additionalProperties": {
              "$ref": "#/$defs/integerRange",
              "type": [
                "integer",
                "object"
              ]
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:inverted"
          }
        }
      },
      "then": {
        "description": "Inverts condition from parameter term.",
        "properties": {
          "term": {
            "title": "Term",
            "description": "The condition to be negated.",
            "type": "object"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:killed_by_player"
          }
        }
      },
      "then": {
        "description": "Test if a killer_player entity is available.",
        "properties": {
          "inverse": {
            "title": "Inverse",
            "description": "If true, the condition passes if killer_player is not available.",
            "type": "boolean"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:location_check"
          }
        }
      },
      "then": {
        "description": "Checks if the current location matches.",
        "properties": {
          "offsetX": {
            "title": "Offset X",
            "description": "Offsets to location.",
            "type": "integer"
          },
          "offsetY": {
            "title": "Offset Y",
            "description": "Offsets to location.",
            "type": "integer"
          },
          "offsetZ": {
            "title": "Offset Z",
            "description": "Offsets to location.",
            "type": "integer"
          },
          "predicate": {
            "$ref": "#/$defs/tagsCommonToAllLocations",
            "title": "Predicate",
            "description": "Predicate applied to location."
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:match_tool"
          }
        }
      },
      "then": {
        "description": "Checks tool.",
        "properties": {
          "predicate": {
            "$ref": "#/$defs/tagsCommonToAllItems",
            "title": "Predicate",
            "description": "Predicate applied to item."
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:random_chance"
          }
        }
      },
      "then": {
        "description": "Test if a random number 0.0–1.0 is less than a specified value.",
        "properties": {
          "chance": {
            "title": "Chance",
            "description": "Success rate.",
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:random_chance_with_looting"
          }
        }
      },
      "then": {
        "description": "Test if a random number 0.0–1.0 is less than a specified value, affected by the level of Looting on the killer entity.",
        "properties": {
          "chance": {
            "title": "Chance",
            "description": "Base success rate.",
            "type": "number"
          },
          "looting_multiplier": {
            "title": "Looting Multiplier",
            "description": "Looting adjustment to the base success rate. Formula is chance + (looting_level * looting_multiplier).",
            "type": "number"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:reference"
          }
        }
      },
      "then": {
        "description": "Test if another referred condition (predicate) passes.",
        "properties": {
          "name": {
            "title": "Name",
            "description": "The namespaced ID of the condition (predicate) referred to. A cyclic reference causes a parsing failure.",
            "type": "string"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:survives_explosion"
          }
        }
      },
      "then": {
        "description": "Returns true with 1/explosion radius probability."
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:table_bonus"
          }
        }
      },
      "then": {
        "description": "Passes with probability picked from table, indexed by enchantment level.",
        "properties": {
          "enchantment": {
            "title": "Enchantment",
            "description": "Id of enchantment.",
            "type": "integer"
          },
          "chances": {
            "title": "Chances",
            "description": "List of probabilities for enchantment level, indexed from 0.",
            "type": "array"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:time_check"
          }
        }
      },
      "then": {
        "description": "Checks the current time.",
        "properties": {
          "value": {
            "$ref": "#/$defs/integerRange",
            "title": "Value",
            "description": "The time value in ticks.",
            "type": [
              "integer",
              "object"
            ]
          },
          "period": {
            "title": "Period",
            "description": "Time gets modulo-divided by this value (for example, if set to 24000, value operates on a time period of daytime ticks just like /time query daytime).",
            "type": "integer"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:weather_check"
          }
        }
      },
      "then": {
        "description": "Checks for a current weather state.",
        "properties": {
          "raining": {
            "title": "Raining",
            "description": "If true, the condition evaluates to true only if it's raining or thundering.",
            "type": "boolean"
          },
          "thundering": {
            "title": "Thundering",
            "description": "If true, the condition evaluates to true only if it's thundering.",
            "type": "boolean"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "conditions": {
            "const": "minecraft:value_check"
          }
        }
      },
      "then": {
        "description": "Checks for range of value.",
        "properties": {
          "value": {
            "$ref": "#/$defs/numberProvider",
            "title": "Value",
            "description": "The value to test.",
            "type": [
              "integer",
              "object"
            ]
          },
          "range": {
            "$ref": "#/$defs/integerRange",
            "title": "Range",
            "description": "If true, the condition evaluates to true only if it's thundering.",
            "type": [
              "integer",
              "object"
            ]
          }
        }
      }
    }
  ],
  "$defs": {
    "numberRange": {
      "type": "object",
      "properties": {
        "max": {
          "title": "Max",
          "description": "The max value.",
          "type": "number"
        },
        "min": {
          "title": "Minimum",
          "description": "The minimum value.",
          "type": "number"
        }
      }
    },
    "integerRange": {
      "properties": {
        "max": {
          "$ref": "#/$defs/numberProvider",
          "title": "Max",
          "description": "The max value.",
          "type": [
            "integer",
            "object"
          ]
        },
        "min": {
          "$ref": "#/$defs/numberProvider",
          "title": "Minimum",
          "description": "The minimum value.",
          "type": [
            "integer",
            "object"
          ]
        }
      }
    },
    "numberProvider": {
      "$comment": "https://minecraft.wiki/w/Loot_table#Number_Providers",
      "properties": {
        "type": {
          "title": "Type",
          "description": "The number provider type.",
          "type": "string",
          "enum": [
            "minecraft:constant",
            "minecraft:uniform",
            "minecraft:binomial",
            "minecraft:score"
          ]
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "type": {
                "const": "minecraft:constant"
              }
            }
          },
          "then": {
            "description": "A constant value.",
            "properties": {
              "value": {
                "title": "Value",
                "description": "The exact value.",
                "type": "number"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "minecraft:uniform"
              }
            }
          },
          "then": {
            "description": "A random number following a uniform distribution between two values (inclusive).",
            "properties": {
              "min": {
                "$ref": "#/$defs/numberProvider",
                "title": "Minimum",
                "description": "The minimum value.",
                "type": [
                  "number",
                  "object"
                ]
              },
              "max": {
                "$ref": "#/$defs/numberProvider",
                "title": "Max",
                "description": "The maximum value.",
                "type": [
                  "number",
                  "object"
                ]
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "minecraft:binomial"
              }
            }
          },
          "then": {
            "description": "A random number following a binomial distribution.",
            "properties": {
              "n": {
                "$ref": "#/$defs/numberProvider",
                "title": "n",
                "description": "The amount of trials.",
                "type": [
                  "integer",
                  "object"
                ]
              },
              "p": {
                "$ref": "#/$defs/numberProvider",
                "title": "p",
                "description": "The probability of success on an individual trial."
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "minecraft:score"
              }
            }
          },
          "then": {
            "description": "A scoreboard value.",
            "properties": {
              "target": {
                "title": "Target",
                "description": "Scoreboard name provider.",
                "type": [
                  "string",
                  "object"
                ],
                "enum": [
                  "this",
                  "killer",
                  "direct_killer",
                  "player_killer"
                ],
                "properties": {
                  "type": {
                    "title": "Type",
                    "description": "Resource location.",
                    "type": "string",
                    "enum": [
                      "fixed",
                      "context"
                    ]
                  }
                },
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "type": {
                          "const": "fixed"
                        }
                      }
                    },
                    "then": {
                      "properties": {
                        "name": {
                          "title": "Name",
                          "description": "A UUID or player name.",
                          "type": "string"
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "type": {
                          "const": "context"
                        }
                      }
                    },
                    "then": {
                      "properties": {
                        "target": {
                          "title": "Target",
                          "type": "string",
                          "enum": [
                            "this",
                            "killer",
                            "direct_killer",
                            "player_killer"
                          ]
                        }
                      }
                    }
                  }
                ]
              },
              "score": {
                "title": "Score",
                "description": "The scoreboard objective.",
                "type": "string"
              },
              "scale": {
                "title": "Scale",
                "description": "Scale to multiply the score before returning it.",
                "type": "number"
              }
            }
          }
        }
      ],
      "type": "object"
    },
    "enchantments": {
      "type": "array",
      "items": {
        "title": "Enchantment",
        "type": "object",
        "properties": {
          "enchantment": {
            "title": "Enchantment",
            "description": "An enchantment ID.",
            "type": "string"
          },
          "levels": {
            "$ref": "#/$defs/integerRange",
            "title": "Levels",
            "description": "The level of the enchantment.",
            "type": [
              "integer",
              "object"
            ]
          }
        }
      }
    },
    "tagsCommonToAllDamageTypes": {
      "type": "object",
      "properties": {
        "bypasses_armor": {
          "title": "Bypasses Armor",
          "description": "Checks if the damage bypassed the armor of the player (suffocation damage predominantly).",
          "type": "boolean"
        },
        "bypasses_invulnerability": {
          "title": "Bypasses Invulnerability",
          "description": "Checks if the damage bypassed the invulnerability status of the player (void or /kill damage).",
          "type": "boolean"
        },
        "bypasses_magic": {
          "title": "Bypasses Magic",
          "description": "Checks if the damage was caused by starvation.",
          "type": "boolean"
        },
        "direct_entity": {
          "title": "Direct Entity",
          "description": "The entity that was the direct cause of the damage.",
          "type": "object"
        },
        "is_explosion": {
          "title": "Is Explosion",
          "description": "Checks if the damage originated from an explosion.",
          "type": "boolean"
        },
        "is_fire": {
          "title": "Is Fire",
          "description": "Checks if the damage originated from fire.",
          "type": "boolean"
        },
        "is_magic": {
          "title": "Is Magic",
          "description": "Checks if the damage originated from magic.",
          "type": "boolean"
        },
        "is_projectile": {
          "title": "Is Projectile",
          "description": "Checks if the damage originated from a projectile.",
          "type": "boolean"
        },
        "is_lightning": {
          "title": "Is Lightning",
          "description": "Checks if the damage originated from lightning.",
          "type": "boolean"
        },
        "source_entity": {
          "$ref": "#/$defs/tagsCommonToAllEntities",
          "title": "Source Entity",
          "description": "Checks the entity that was the source of the damage (for example: The skeleton that shot the arrow)."
        }
      }
    },
    "tagsCommonToAllItems": {
      "type": "object",
      "properties": {
        "count": {
          "$ref": "#/$defs/integerRange",
          "title": "Count",
          "description": "The amount of the item.",
          "type": [
            "integer",
            "object"
          ]
        },
        "durability": {
          "$ref": "#/$defs/integerRange",
          "title": "Durability",
          "description": "The durability of the item.",
          "type": [
            "integer",
            "object"
          ]
        },
        "enchantments": {
          "$ref": "#/$defs/enchantments",
          "title": "Enchantments",
          "description": "List of enchantments."
        },
        "stored_enchantments": {
          "$ref": "#/$defs/enchantments",
          "title": "Stored Enchantments",
          "description": "List of stored enchantments."
        },
        "items": {
          "title": "Items",
          "description": "List of item IDs.",
          "type": "array"
        },
        "nbt": {
          "title": "NBT",
          "description": "An NBT string.",
          "type": "string"
        },
        "potion": {
          "title": "Potion",
          "description": "A brewed potion ID.",
          "type": "string"
        },
        "tag": {
          "title": "Tag",
          "description": "An item data pack tag.",
          "type": "string"
        }
      }
    },
    "tagsCommonToAllLocations": {
      "type": "object",
      "properties": {
        "biome": {
          "title": "Biome",
          "description": "The biome the entity is currently in.",
          "type": "string",
          "enum": [
            "badlands",
            "badlands_plateau",
            "beach",
            "birch_forest",
            "birch_forest_hills",
            "cold_ocean",
            "dark_forest",
            "dark_forest_hills",
            "deep_cold_ocean",
            "deep_frozen_ocean",
            "deep_lukewarm_ocean",
            "deep_ocean",
            "deep_warm_ocean",
            "desert",
            "desert_hills",
            "desert_lakes",
            "end_barrens",
            "end_highlands",
            "end_midlands",
            "eroded_badlands",
            "flower_forest",
            "forest",
            "frozen_ocean",
            "frozen_river",
            "giant_spruce_taiga",
            "giant_spruce_taiga_hills",
            "giant_tree_taiga",
            "giant_tree_taiga_hills",
            "gravelly_mountains",
            "ice_spikes",
            "jungle",
            "jungle_edge",
            "jungle_hills",
            "lukewarm_ocean",
            "modified_badlands_plateau",
            "modified_gravelly_mountains",
            "modified_jungle",
            "modified_jungle_edge",
            "modified_wooded_badlands_plateau",
            "mountain_edge",
            "mountains",
            "mushroom_field_shore",
            "mushroom_fields",
            "nether",
            "ocean",
            "plains",
            "river",
            "savanna",
            "savanna_plateau",
            "shattered_savanna",
            "shattered_savanna_plateau",
            "small_end_islands",
            "snowy_beach",
            "snowy_mountains",
            "snowy_taiga",
            "snowy_taiga_hills",
            "snowy_taiga_mountains",
            "snowy_tundra",
            "stone_shore",
            "sunflower_plains",
            "swamp",
            "swamp_hills",
            "taiga",
            "taiga_hills",
            "taiga_mountains",
            "tall_birch_forest",
            "tall_birch_hills",
            "the_end",
            "the_void",
            "warm_ocean",
            "wooded_badlands_plateau",
            "wooded_hills",
            "wooded_mountains"
          ]
        },
        "block": {
          "title": "Block",
          "description": "The block at the location.",
          "type": "object",
          "properties": {
            "blocks": {
              "title": "Blocks",
              "description": "A list of block IDs.",
              "type": "array"
            },
            "tag": {
              "title": "Tag",
              "description": "The block tag.",
              "type": "string"
            },
            "nbt": {
              "title": "NBT",
              "description": "The block NBT.",
              "type": "string"
            },
            "state": {
              "title": "State",
              "description": "A map of block property names to values. Test will fail if the block doesn't match.",
              "type": "object",
              "properties": {
                "key": {
                  "$ref": "#/$defs/integerRange",
                  "title": "Key",
                  "description": "Block property key and value pair.",
                  "type": [
                    "boolean",
                    "integer",
                    "string",
                    "object"
                  ]
                }
              }
            }
          }
        },
        "dimension": {
          "title": "Dimension",
          "description": "The dimension the entity is currently in.",
          "type": "string"
        },
        "feature": {
          "title": "Feature",
          "description": "Name of a structure.",
          "type": "string",
          "enum": [
            "buried_treasure",
            "desert_pyramid",
            "endcity",
            "fortress",
            "igloo",
            "jungle_pyramid",
            "mansion",
            "mineshaft",
            "monument",
            "ocean_ruin",
            "pillager_outpost",
            "shipwreck",
            "stronghold",
            "swamp_hut",
            "village"
          ]
        },
        "fluid": {
          "title": "Fluid",
          "description": "The fluid at the location.",
          "type": "object",
          "properties": {
            "fluid": {
              "title": "Fluid",
              "description": "The fluid ID.",
              "type": "string"
            },
            "tag": {
              "title": "Tag",
              "description": "The fluid tag.",
              "type": "string"
            },
            "state": {
              "$ref": "#/$defs/integerRange",
              "title": "State",
              "description": "A map of fluid property names to values. Test will fail if the fluid doesn't match.",
              "type": [
                "boolean",
                "integer",
                "string",
                "object"
              ]
            }
          }
        },
        "light": {
          "title": "Light",
          "description": "The light at the location.",
          "type": "object",
          "properties": {
            "light": {
              "$ref": "#/$defs/integerRange",
              "title": "Light",
              "description": "The light Level of visible light. Calculated using: (max(sky-darkening,block)).",
              "type": [
                "integer",
                "object"
              ]
            }
          }
        },
        "position": {
          "title": "Position",
          "type": "object",
          "properties": {
            "x": {
              "$ref": "#/$defs/numberRange",
              "title": "X",
              "description": "The X position."
            },
            "y": {
              "$ref": "#/$defs/numberRange",
              "title": "Y",
              "description": "The Y position."
            },
            "z": {
              "$ref": "#/$defs/numberRange",
              "title": "Z",
              "description": "The Z position."
            }
          }
        },
        "smokey": {
          "title": "Smokey",
          "description": "True if the block is closely above a campfire or soul campfire.",
          "type": "boolean"
        }
      }
    },
    "tagsCommonToAllEntities": {
      "type": "object",
      "properties": {
        "distance": {
          "title": "Distance",
          "type": "object",
          "properties": {
            "absolute": {
              "$ref": "#/$defs/numberRange",
              "title": "Absolute"
            },
            "horizontal": {
              "$ref": "#/$defs/numberRange",
              "title": "Horizontal"
            },
            "x": {
              "$ref": "#/$defs/numberRange",
              "title": "X"
            },
            "y": {
              "$ref": "#/$defs/numberRange",
              "title": "Y"
            },
            "z": {
              "$ref": "#/$defs/numberRange",
              "title": "Z"
            }
          }
        },
        "effects": {
          "title": "Effects",
          "description": "A map of status effects.",
          "additionalProperties": {
            "title": "Effect",
            "description": "A status effect with the key name being the status effect name.",
            "type": "object",
            "properties": {
              "ambient": {
                "title": "Ambient",
                "description": "Whether the effect is from a beacon.",
                "type": "boolean"
              },
              "amplifier": {
                "$ref": "#/$defs/integerRange",
                "title": "Amplifier",
                "description": "The effect amplifier.",
                "type": [
                  "integer",
                  "object"
                ]
              },
              "duration": {
                "$ref": "#/$defs/integerRange",
                "title": "Duration",
                "description": "The effect duration in ticks.",
                "type": [
                  "integer",
                  "object"
                ]
              },
              "visible": {
                "title": "Visible",
                "description": "Whether the effect has visible particles.",
                "type": "boolean"
              }
            }
          }
        },
        "equipment": {
          "title": "Equipment",
          "type": "object",
          "properties": {
            "mainhand": {
              "$ref": "#/$defs/tagsCommonToAllItems",
              "title": "Mainhand"
            },
            "offhand": {
              "$ref": "#/$defs/tagsCommonToAllItems",
              "title": "Offhand"
            },
            "head": {
              "$ref": "#/$defs/tagsCommonToAllItems",
              "title": "Head"
            },
            "chest": {
              "$ref": "#/$defs/tagsCommonToAllItems",
              "title": "Chest"
            },
            "legs": {
              "$ref": "#/$defs/tagsCommonToAllItems",
              "title": "Legs"
            },
            "feet": {
              "$ref": "#/$defs/tagsCommonToAllItems",
              "title": "Feet"
            }
          }
        },
        "flags": {
          "title": "Flags",
          "description": "Predicate Flags to be checked.",
          "type": "object",
          "properties": {
            "is_on_fire": {
              "title": "Is on Fire",
              "description": "Test whether the entity is or is not on fire."
            },
            "is_sneaking": {
              "title": "Is Sneaking",
              "description": "Test whether the entity is or is not sneaking.",
              "type": "boolean"
            },
            "is_sprinting": {
              "title": "Is Sprinting",
              "description": "Test whether the entity is or is not sprinting.",
              "type": "boolean"
            },
            "is_swimming": {
              "title": "Is Swimming",
              "description": "Test whether the entity is or is not swimming.",
              "type": "boolean"
            },
            "is_baby": {
              "title": "Is Baby",
              "description": "Test whether the entity is or is not a baby variant.",
              "type": "boolean"
            }
          }
        },
        "lightning_bolt": {
          "title": "Lightning Bolt",
          "description": "Lightning bolt properties to be checked. Fails when entity is not a lightning bolt.",
          "type": "object",
          "properties": {
            "blocks_set_on_fire": {
              "title": "Blocks Set on Fire",
              "description": "Number of blocks set on fire by this lightning bolt.",
              "type": "integer"
            },
            "entity_struck": {
              "$ref": "#/$defs/tagsCommonToAllEntities",
              "title": "Entity Struck",
              "description": "Entity properties of entities struck by this lightning bolt. If present, this tag must match one or more entities."
            }
          }
        },
        "location": {
          "$ref": "#/$defs/tagsCommonToAllLocations",
          "title": "Location"
        },
        "nbt": {
          "title": "NBT",
          "description": "An NBT string.",
          "type": "string"
        },
        "passenger": {
          "$ref": "#/$defs/tagsCommonToAllEntities",
          "title": "Passenger",
          "description": "The entity directly riding this entity."
        },
        "player": {
          "title": "Player",
          "description": "Player properties to be checked. Fails when entity is not a player.",
          "type": "object",
          "properties": {
            "looking_at": {
              "$ref": "#/$defs/tagsCommonToAllEntities",
              "title": "Looking At",
              "description": "The entity that the player is looking at, as long as it is visible and within a radius of 100 blocks."
            },
            "advancements": {
              "title": "Advancements",
              "description": "A map of advancements to check.",
              "type": "object",
              "additionalProperties": {
                "description": "An advancement ID.",
                "type": [
                  "boolean",
                  "object"
                ],
                "additionalProperties": {
                  "type": "boolean"
                }
              }
            },
            "gamemode": {
              "title": "Game Mode",
              "description": "The game mode of the player.",
              "type": "string",
              "enum": [
                "survival",
                "adventure",
                "creative",
                "spectator"
              ]
            },
            "level": {
              "$ref": "#/$defs/integerRange",
              "title": "Level",
              "description": "The level of the player.",
              "type": [
                "integer",
                "object"
              ]
            },
            "recipes": {
              "title": "Recipes",
              "description": "A map of recipes to check.",
              "type": "object",
              "additionalProperties": {
                "type": "boolean"
              }
            },
            "stats": {
              "title": "Stats",
              "description": "List of statistics to match.",
              "type": "object",
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "type": {
                    "title": "Type",
                    "description": "The statistic base.",
                    "type": "string",
                    "enum": [
                      "minecraft:custom",
                      "minecraft:crafted",
                      "minecraft:used",
                      "minecraft:broken",
                      "minecraft:mined",
                      "minecraft:killed",
                      "minecraft:picked_up",
                      "minecraft:dropped",
                      "minecraft:killed_by"
                    ]
                  },
                  "stat": {
                    "title": "Stat",
                    "description": "The statistic ID. Mostly mimics the criteria used for defining scoreboard objectives.",
                    "type": "string"
                  },
                  "value": {
                    "$ref": "#/$defs/integerRange",
                    "title": "Value",
                    "description": "The value of the statistic.",
                    "type": [
                      "integer",
                      "object"
                    ]
                  }
                }
              }
            }
          }
        },
        "stepping_on": {
          "$ref": "#/$defs/tagsCommonToAllLocations",
          "title": "Stepping On",
          "description": "Location predicate for the block the entity is standing on."
        },
        "team": {
          "title": "Team",
          "description": "The team the entity belongs to.",
          "type": "string"
        },
        "type": {
          "title": "Type",
          "description": "An entity ID.",
          "type": "string"
        },
        "targeted_entity": {
          "$ref": "#/$defs/tagsCommonToAllEntities",
          "title": "Targeted Entity",
          "description": "The entity which this entity is targeting for attacks."
        },
        "vehicle": {
          "$ref": "#/$defs/tagsCommonToAllEntities",
          "title": "Vehicle",
          "description": " The vehicle that the entity is riding on."
        }
      }
    }
  },
  "$comment": "https://minecraft.wiki/w/Predicate"
}
