{
  "$comment": "https://minecraft.fandom.com/wiki/Custom_dimension#Dimension_syntax",
  "$id": "https://json.schemastore.org/minecraft-dimension.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "noise": {
      "title": "noise options",
      "type": "object",
      "properties": {
        "firstOctave": {
          "title": "First Octave",
          "description": "The lower the value, the smoother the changes in altitude will be, making biome edges smoother.",
          "type": "integer",
          "default": -7
        },
        "amplitudes": {
          "title": "Amplitudes",
          "description": "A list of floats. Using more values allows for greater precision. Higher absolute values seem to make the altitude reach greater absolute values.",
          "type": "array",
          "items": {
            "type": "number"
          },
          "default": [1, 1]
        }
      }
    },
    "dimensionType": {
      "$comment": "https://minecraft.fandom.com/wiki/Custom_dimension#Dimension_type",
      "title": "dimension type",
      "description": "Configuration file defining a dimension type for a data pack for Minecraft.",
      "type": "object",
      "properties": {
        "name": {
          "title": "Name",
          "description": "The resource location used for the dimension type.",
          "type": "string"
        },
        "ultrawarm": {
          "title": "Ultrawarm",
          "description": "Whether the dimensions behaves like the nether (water evaporates and sponges dry) or not. Also lets stalactites drip lava and causes lava to spread faster and thinner.",
          "type": "boolean"
        },
        "natural": {
          "title": "Natural",
          "description": "When true, nether portals can spawn zombified piglins. When false, compasses spin randomly, and using a bed to set the respawn point or sleep, is disabled.",
          "type": "boolean"
        },
        "coordinate_scale": {
          "title": "Coordinate Scale",
          "description": "The multiplier applied to coordinates when traveling to the dimension.",
          "type": "number"
        },
        "has_skylight": {
          "title": "Has Skylight",
          "description": "Whether the dimension has skylight access or not.",
          "type": "boolean"
        },
        "has_ceiling": {
          "title": "Has Ceiling",
          "description": "Whether the dimension has a bedrock ceiling or not.",
          "type": "boolean"
        },
        "ambient_light": {
          "title": "Ambient Light",
          "description": "How much light the dimension has.",
          "type": "number",
          "default": 0.5
        },
        "fixed_time": {
          "title": "Fixed Time",
          "description": "If this is set to a number, the time of the day is the specified value.",
          "anyOf": [
            {
              "type": "boolean",
              "default": false
            },
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 24000
            }
          ]
        },
        "piglin_safe": {
          "title": "Piglin Safe",
          "description": "Whether piglins shake and transform to zombified piglins.",
          "type": "boolean"
        },
        "bed_works": {
          "title": "Bed Words",
          "description": "When false, the bed blows up when trying to sleep.",
          "type": "boolean"
        },
        "respawn_anchor_works": {
          "title": "Respawn Anchor Works",
          "description": "Whether players can charge and use respawn anchors.",
          "type": "boolean"
        },
        "has_raids": {
          "title": "Has Raids",
          "description": "Whether players with the Bad Omen effect can cause a raid.",
          "type": "boolean"
        },
        "logical_height": {
          "title": "Logical Height",
          "description": "The maximum height to which chorus fruits and nether portals can bring players within this dimension. This excludes portals that were already built above the limit as they still connect normally.",
          "type": "integer"
        },
        "min_y": {
          "title": "Minimum Y",
          "description": "The minimum height in which blocks can exist within this dimension.",
          "type": "integer",
          "minimum": -2032,
          "maximum": 2031,
          "multipleOf": 16
        },
        "height": {
          "title": "Height",
          "description": "The total height in which blocks can exist within this dimension.",
          "type": "integer",
          "minimum": 0,
          "maximum": 4096,
          "multipleOf": 16
        },
        "infiniburn": {
          "title": "Infiniburn",
          "description": "A resource location defining what block tag to use for infiniburn.",
          "type": "string"
        },
        "effects": {
          "title": "Effects",
          "description": "Determines the dimension effect used for this dimension.",
          "type": "string",
          "enum": [
            "minecraft:overworld",
            "minecraft:the_nether",
            "minecraft:the_end"
          ],
          "default": "minecraft:overworld"
        }
      }
    }
  },
  "description": "Configuration file defining a dimension for a data pack for Minecraft.",
  "properties": {
    "type": {
      "title": "Type",
      "description": "The namespaced ID of the dimension type.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "minecraft:overworld",
            "minecraft:overworld_caves",
            "minecraft:the_nether",
            "minecraft:the_end"
          ]
        },
        {
          "$ref": "#/definitions/dimensionType"
        }
      ]
    },
    "generator": {
      "title": "generator",
      "description": "Generation settings used for that dimension.",
      "type": "object",
      "properties": {
        "type": {
          "title": "Type",
          "description": "The ID of the generator.",
          "type": "string",
          "enum": ["minecraft:flat", "minecraft:noise", "minecraft:debug"]
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "type": {
                "const": "minecraft:flat"
              }
            }
          },
          "then": {
            "properties": {
              "settings": {
                "title": "superflat options",
                "description": "Superflat settings.",
                "type": "object",
                "properties": {
                  "layers": {
                    "title": "Layers",
                    "description": "Layer settings.",
                    "type": "array",
                    "items": {
                      "title": "layer options",
                      "description": "A superflat layer. The first entry is the bottom layer, the last entry is the top layer.",
                      "type": "object",
                      "properties": {
                        "height": {
                          "title": "Height",
                          "description": "The number of blocks in the layer.",
                          "type": "integer"
                        },
                        "block": {
                          "title": "Block",
                          "description": "The block the layer is made of.",
                          "type": "string"
                        }
                      }
                    }
                  },
                  "biome": {
                    "title": "Biome",
                    "description": "The single biome of the world.",
                    "type": "string"
                  },
                  "lakes": {
                    "title": "Lakes",
                    "description": "Whether or not to generate lakes. If set to true, then water and lava lakes generate often even in biomes where lakes don't normally generate. Lava lakes generate surrounded by different types of stone and ores from the overworld.",
                    "type": "boolean"
                  },
                  "features": {
                    "title": "Features",
                    "description": "Whether or not to generate biome-specific decorations like trees, grass, flowers, cacti, etc.",
                    "type": "boolean"
                  },
                  "structures": {
                    "title": "structure options",
                    "description": "Structure settings.",
                    "type": "object",
                    "properties": {
                      "stronghold": {
                        "title": "stronghold options",
                        "description": "Settings for how strongholds should be spawned.",
                        "type": "object",
                        "properties": {
                          "distance": {
                            "title": "Distance",
                            "description": "Controls how far apart the strongholds are.",
                            "type": "integer"
                          },
                          "count": {
                            "title": "Count",
                            "description": "How many strongholds to generate.",
                            "type": "integer"
                          },
                          "spread": {
                            "title": "Spread",
                            "type": "integer"
                          }
                        }
                      },
                      "structures": {
                        "title": "structures",
                        "description": "Map of structures to use in this dimension.",
                        "type": "object",
                        "additionalProperties": {
                          "title": "structure",
                          "type": "object",
                          "properties": {
                            "spacing": {
                              "title": "Spacing",
                              "description": "Average distance between two structure placement attempts of this type in chunks.",
                              "type": "integer"
                            },
                            "seperation": {
                              "title": "Seperation",
                              "description": "Minimum distance between two structures of this type in chunks; must be less than spacing.",
                              "type": "integer"
                            },
                            "salt": {
                              "title": "Salt",
                              "description": "A number that assists in randomization.",
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "type": {
                "const": "minecraft:noise"
              }
            }
          },
          "then": {
            "properties": {
              "seed": {
                "title": "Seed",
                "description": "The seed used to generate the dimension. In most cases, this is exactly the same as the world seed, but can be different and the dimension generated is based upon this seed and not the world seed.",
                "type": "integer"
              },
              "settings": {
                "title": "Settings",
                "description": "The noise settings used in the terrain generator. Can be set to a string to use a preset defined in the worldgen/noise_settings folder with a list of customized options.",
                "type": ["string", "object"]
              },
              "biome_source": {
                "title": "biome source",
                "description": "Settings dictating which biomes and biome shapes.",
                "type": "object",
                "properties": {
                  "seed": {
                    "title": "Seed",
                    "description": "The seed used for biome generation.",
                    "type": "integer"
                  },
                  "biomes": {
                    "title": "Biomes",
                    "description": "A list of biome IDs to generate.",
                    "type": "array"
                  },
                  "type": {
                    "title": "Type",
                    "description": "The type of biome generation.",
                    "type": "string",
                    "allOf": [
                      {
                        "if": {
                          "properties": {
                            "type": {
                              "const": "minecraft:vanilla_layered"
                            }
                          }
                        },
                        "then": {
                          "description": "Default and large biome generation used in the overworld.",
                          "properties": {
                            "large_biomes": {
                              "title": "Large Biomes",
                              "description": "Whether the biomes are large.",
                              "type": "boolean"
                            },
                            "legacy_biome_init_layer": {
                              "title": "Legacy Biome Init Layer",
                              "description": "Whether the world was default_1_1.",
                              "type": "boolean"
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "properties": {
                            "type": {
                              "const": "minecraft:fixed"
                            }
                          }
                        },
                        "then": {
                          "description": "A single biome.",
                          "properties": {
                            "biome": {
                              "title": "Biome",
                              "description": "The single biome to generate.",
                              "type": "string"
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "properties": {
                            "type": {
                              "const": "minecraft:checkerboard"
                            }
                          }
                        },
                        "then": {
                          "description": "A biome generation in which biomes are square (or close to square) and repeat along the diagonals.",
                          "properties": {
                            "biomes": {
                              "title": "Biomes",
                              "description": "A list of biomes that repeat along the diagonals.",
                              "type": "array"
                            },
                            "scale": {
                              "title": "Scale",
                              "description": "Determines the size of the squares on an exponential scale.",
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 62
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "properties": {
                            "type": {
                              "const": "minecraft:multi_noise"
                            }
                          }
                        },
                        "then": {
                          "description": "3D biome generation used in the nether.",
                          "properties": {
                            "altitude_noise": {
                              "title": "Altitude Noise",
                              "description": "How the altitude parameter is spread in the world.",
                              "$ref": "#/definitions/noise"
                            },
                            "weirdness_noise": {
                              "title": "Weirdness Noise",
                              "description": "Similar to altitude_noise for the weirdness parameter.",
                              "$ref": "#/definitions/noise"
                            },
                            "temperature_noise": {
                              "title": "Temperature Noise",
                              "description": "Similar to altitude_noise for the temperature parameter.",
                              "$ref": "#/definitions/noise"
                            },
                            "humidity_noise": {
                              "title": "Humidity Noise",
                              "description": "Similar to altitude_noise for the humidity parameter.",
                              "$ref": "#/definitions/noise"
                            }
                          },
                          "anyOf": [
                            {
                              "properties": {
                                "preset": {
                                  "title": "Preset",
                                  "description": "A preset of the set of biomes to be used.",
                                  "type": "string",
                                  "enum": ["minecraft:nether"]
                                }
                              }
                            },
                            {
                              "properties": {
                                "biomes": {
                                  "title": "Biomes",
                                  "description": "A list of biomes, including their likelihood.",
                                  "type": "array",
                                  "items": {
                                    "title": "biome",
                                    "type": "object",
                                    "description": "A biome and its properties.",
                                    "properties": {
                                      "biome": {
                                        "title": "Biome",
                                        "description": "The biome.",
                                        "type": "string"
                                      },
                                      "parameters": {
                                        "title": "parameters",
                                        "description": "Represent optimal conditions for where the biome should be placed. These values do not affect the generation of terrain within biomes; they affect where the game chooses to place biomes.",
                                        "type": "object",
                                        "properties": {
                                          "altitude": {
                                            "title": "Altitude",
                                            "description": "Used to place similar biomes near each other.",
                                            "type": "number",
                                            "minimum": -2,
                                            "maximum": 2
                                          },
                                          "weirdness": {
                                            "title": "Weirdness",
                                            "description": "Defines how weird the biome is going to appear next to other biomes.",
                                            "type": "number",
                                            "minimum": -2,
                                            "maximum": 2
                                          },
                                          "offset": {
                                            "title": "Offset",
                                            "description": " Similar to the other parameters but offset is 0 everywhere, thus setting this parameter nearer to 0 gives the biome a greater edge over others, all else being equal.",
                                            "type": "number",
                                            "minimum": 0,
                                            "maximum": 1
                                          },
                                          "temperature": {
                                            "title": "Temperature",
                                            "description": "Used to place similar biomes near each other. This is NOT the same as the temperature value listed on Biome, it does NOT affect rain/snow or the color of leaves and grass.",
                                            "type": "number",
                                            "minimum": -2,
                                            "maximum": 2
                                          },
                                          "humidity": {
                                            "title": "Humidity",
                                            "description": "Used to place similar biomes near each other.",
                                            "type": "number",
                                            "minimum": -2,
                                            "maximum": 2
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          ]
                        }
                      },
                      {
                        "if": {
                          "properties": {
                            "type": {
                              "const": "minecraft:the_end"
                            }
                          }
                        },
                        "then": {
                          "description": "Biome generation used in the end with biome minecraft:the_end in the center and other end biomes around."
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      ]
    }
  },
  "title": "Minecraft Data Pack Dimension",
  "type": "object"
}