{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/minecraft-data-pack-template-pool/latest.json",
  "title": "Minecraft Data Pack Template Pool",
  "description": "Configuration file defining a template pool for a data pack for Minecraft.",
  "x-lintel": {
    "source": "https://www.schemastore.org/minecraft-template-pool.json",
    "sourceSha256": "effe98d135da940493b9c339ad69042f0099e25599ee90cb82aa7ddde9399883",
    "fileMatch": [
      "**/data/*/worldgen/template_pool/*.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "object",
  "properties": {
    "name": {
      "title": "Name",
      "description": "The namespaced ID of the pool.",
      "type": "string"
    },
    "fallback": {
      "title": "Fallback",
      "description": "Can set to another template pool, which generates when the original pool cannot generate at the end of all layers.",
      "type": "string"
    },
    "elements": {
      "title": "Elements",
      "description": "A list of structures to choose from.",
      "type": "array",
      "items": {
        "title": "Element",
        "type": "object",
        "properties": {
          "weight": {
            "title": "Weight",
            "description": "How likely this element is to be chosen when using this pool.",
            "type": "integer"
          },
          "element": {
            "title": "Element",
            "description": "The properties of this element.",
            "type": "object",
            "properties": {
              "element_type": {
                "title": "Element Type",
                "type": "string",
                "enum": [
                  "minecraft:empty_pool_element",
                  "minecraft:feature_pool_element",
                  "minecraft:list_pool_element",
                  "minecraft:legacy_single_pool_element",
                  "minecraft:single_pool_element"
                ]
              },
              "feature": {
                "title": "Feature",
                "description": "The namespaced id of the feature.",
                "type": "string"
              },
              "location": {
                "title": "Location",
                "description": "The namespaced id of the structure to place.",
                "type": "string"
              },
              "projection": {
                "title": "Projection",
                "type": "string",
                "enum": [
                  "rigid",
                  "terrain_matching"
                ]
              },
              "processors": {
                "title": "Processors",
                "description": "The namespaced ID of a processor if this is a string.",
                "type": [
                  "string",
                  "object"
                ],
                "properties": {
                  "processors": {
                    "title": "Processors",
                    "description": "A list of processors to use.",
                    "type": "array",
                    "items": {
                      "title": "Processor",
                      "type": "object",
                      "properties": {
                        "processor_type": {
                          "title": "Processor Type",
                          "description": "The namespaced id of the processor to use.",
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "elements": {
                "title": "Elements",
                "description": "A list of structures to choose from.",
                "type": "array",
                "items": {
                  "title": "Element",
                  "type": "object",
                  "properties": {
                    "weight": {},
                    "location": {
                      "title": "Location",
                      "description": "The namespaced id of the structure to place.",
                      "type": "string"
                    },
                    "projection": {
                      "title": "Projection",
                      "type": "string",
                      "enum": [
                        "rigid",
                        "terrain_matching"
                      ]
                    },
                    "element_type": {
                      "title": "Element Type",
                      "type": "string",
                      "enum": [
                        "minecraft:empty_pool_element",
                        "minecraft:list_pool_element",
                        "minecraft:legacy_single_pool_element",
                        "minecraft:single_pool_element"
                      ]
                    },
                    "processors": {
                      "title": "Processors",
                      "description": "The namespaced ID of a processor if this is a string.",
                      "type": [
                        "string",
                        "object"
                      ],
                      "properties": {
                        "processors": {
                          "title": "Processors",
                          "description": "A list of processors to use.",
                          "type": "array",
                          "items": {
                            "title": "Processor",
                            "type": "object",
                            "properties": {
                              "processor_type": {
                                "title": "Processor Type",
                                "description": "The namespaced id of the processor to use.",
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "$comment": "https://minecraft.wiki/w/Custom_world_generation#Jigsaw_pools"
}
