{
  "$comment": "https://minecraft.wiki/w/Custom_world_generation#Jigsaw_pools",
  "$id": "https://json.schemastore.org/minecraft-template-pool.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "Configuration file defining a template pool for a data pack for Minecraft.",
  "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"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "title": "Minecraft Data Pack Template Pool",
  "type": "object"
}
