{
  "type": "object",
  "title": "Geode Feature",
  "description": "`minecraft:geode_feature` generates a rock formation to simulate a geode. Each layer of, and block within, the geode can be replaced.\nSucceeds if: At least one block within the geode is placed.\nFails if: All blocks within the geode fail to be placed.",
  "required": [
    "description",
    "max_radius",
    "filler",
    "inner_layer",
    "alternate_inner_layer",
    "use_alternate_layer0_chance",
    "middle_layer",
    "outer_layer",
    "placements_require_layer0_alternate",
    "use_potential_placements_chance",
    "min_distribution_points",
    "max_distribution_points",
    "min_outer_wall_distance",
    "max_outer_wall_distance",
    "min_point_offset",
    "max_point_offset",
    "noise_multiplier",
    "invalid_blocks_threshold",
    "crack_point_offset",
    "generate_crack_chance",
    "base_crack_size"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "description": {
        "identifier": "geode_features:geode_feature"
      },

      "max_radius": 80,

      "filler": "minecraft:air",

      "inner_layer": "minecraft:stone",
      "alternate_inner_layer": "minecraft:cobblestone",
      "use_alternate_layer0_chance": 0.5,

      "middle_layer": "minecraft:planks",

      "outer_layer": "minecraft:obsidian",

      "inner_placements": ["minecraft:glass"],
      "placements_require_layer0_alternate": true,
      "use_potential_placements_chance": 0.125,

      "min_distribution_points": 3,
      "max_distribution_points": 3,
      "min_outer_wall_distance": 3,
      "max_outer_wall_distance": 3,
      "min_point_offset": 0,
      "max_point_offset": 0,
      "noise_multiplier": 0.025,
      "invalid_blocks_threshold": 10000,

      "crack_point_offset": 0,
      "generate_crack_chance": 0,
      "base_crack_size": 0
    }
  ],
  "properties": {
    "description": {
      "$ref": "../types/description.json"
    },
    "filler": {
      "title": "Filler",
      "type": "string",
      "description": "The block to fill the inside of the geode.",
      "$ref": "../../../general/block/identifier.json"
    },
    "inner_layer": {
      "title": "Inner Layer",
      "type": "string",
      "description": "The block that forms the inside layer of the geode shell.",
      "$ref": "../../../general/block/identifier.json"
    },
    "alternate_inner_layer": {
      "title": "Alternate Inner Layer",
      "type": "string",
      "description": "The block that has a chance of generating instead of inner_layer.",
      "$ref": "../../../general/block/identifier.json"
    },
    "middle_layer": {
      "title": "Middle Layer",
      "type": "string",
      "description": "The block that forms the middle layer of the geode shell.",
      "$ref": "../../../general/block/identifier.json"
    },
    "outer_layer": {
      "title": "Outer Layer",
      "type": "string",
      "description": "The block that forms the outer shell of the geode.",
      "$ref": "../../../general/block/identifier.json"
    },
    "inner_placements": {
      "title": "Inner Placements",
      "description": "A list of blocks that may be replaced during placement. Omit this field to allow any block to be replaced.",
      "type": "array",
      "minItems": 1,
      "items": {
        "title": "Block Reference",
        "description": "A block that may be replaced during placement.",
        "$ref": "../../../general/block/identifier.json"
      }
    },
    "min_outer_wall_distance": {
      "title": "Minimum Outer Wall Distance",
      "type": "integer",
      "description": "The minimum distance each distribution point must be from the outer wall. [0,10]",
      "minimum": 1,
      "maximum": 10
    },
    "max_outer_wall_distance": {
      "title": "Maximum Outer Wall Distance",
      "type": "integer",
      "description": "The maximum distance each distribution point can be from the outer wall. [0,20]",
      "minimum": 1,
      "maximum": 20
    },
    "min_distribution_points": {
      "title": "Minimum Distribution Points",
      "type": "integer",
      "description": "The minimum number of points inside the distance field that can get generated. The distance field is the area consisting of all points with a minimum distance to all destribution points. [0,10]",
      "minimum": 1,
      "maximum": 10
    },
    "max_distribution_points": {
      "title": "Maximum Distribution Points",
      "type": "integer",
      "description": "The maximum number of points inside the distance field that can get generated. The distance field is the area consisting of all points with a minimum distance to all destribution points. [0,20]",
      "minimum": 1,
      "maximum": 20
    },
    "min_point_offset": {
      "title": "Minimum Point Offset",
      "type": "integer",
      "description": "The lowest possible value of random offset applied to the position of each distribution point. [0,10]",
      "minimum": 0,
      "maximum": 10
    },
    "max_point_offset": {
      "title": "Maximum Point Offset",
      "type": "integer",
      "description": "The highest possible value of random offset applied to the position of each distribution point. [0,10]",
      "minimum": 0,
      "maximum": 10
    },
    "max_radius": {
      "title": "Maximum Radius",
      "type": "integer",
      "description": "The maximum possible radius of the geode generated."
    },
    "crack_point_offset": {
      "title": "Crack Point Offset",
      "type": "integer",
      "description": "An offset applied to each distribution point that forms the geode crack opening. [0,10]",
      "minimum": 0,
      "maximum": 10
    },
    "generate_crack_chance": {
      "title": "Generate Crack Chance",
      "type": "number",
      "description": "The likelihood of a geode generating with a crack in its shell. [0,1]",
      "minimum": 0.0,
      "maximum": 1.0
    },
    "base_crack_size": {
      "title": "Base Crack Size",
      "type": "number",
      "description": "How large the crack opening of the geode should be when generated. [0,5]",
      "minimum": 0.0,
      "maximum": 5.0
    },
    "noise_multiplier": {
      "title": "Noise Multiplier",
      "type": "number",
      "description": "A multiplier applied to the noise that is applied to the distribution points within the geode. Higher = more noisy."
    },
    "use_potential_placements_chance": {
      "title": "Use Potential Placements Chance",
      "type": "number",
      "description": "The likelihood that a special block will be placed on the inside of the geode. [0,1]",
      "minimum": 0.0,
      "maximum": 1.0
    },
    "use_alternate_layer0_chance": {
      "title": "Use Alternate Layer0 Chance",
      "type": "number",
      "description": "The likelihood that a block in the innermost layer of the geode will be replaced with an alternate option. [0,1]",
      "minimum": 0.0,
      "maximum": 1.0
    },
    "placements_require_layer0_alternate": {
      "title": "Placements Require Layer0 Alternate",
      "type": "boolean",
      "description": " If true, the potential placement block will only be placed on the alternate layer0 blocks that get placed. Potential placement blocks are blocks that depend on the existance of another block to be placed. The latter are the layer0 alternate blocks."
    },
    "invalid_blocks_threshold": {
      "title": "Invalid Blocks Threshold",
      "type": "integer",
      "description": "The threshold of invalid blocks for a geode to have a distribution point in before it aborts generation entirely."
    }
  }
}
