Skip to content

Worldgen JSON Syntax

LAGIdiot edited this page Feb 22, 2021 · 19 revisions

Root config structure

Each world gen definition config consists of following parts:

  • weight - weight of this ore definition compared to other veins. The higher this value, the more this veins occurs in place of other ore veins. Completely custom, any positive integer values are allowed.

  • density - defines relation of amount of ore blocks in vein to it's total size. Ranges in (0;1] decimal. The more it is, the more ore blocks this vein contains in it's shape.

  • priority (optional) - defines generation priority of this ore vein. Veins with bigger values are generated first, if multiple veins are encouraged in grid section. Useful for granite formations.

  • min_height (optional) - defines minimum height requirement for generation of this ore vein. It will generate only if center of vein is above this value. By default, minimum height is not limited.

  • max_height (optional) - defines maximum height requirement for generation of this ore vein. It will generate only if center of vein is below this value. By default, maximum height is not limited.

  • biome_modifier (optional) - defines map of weight modifier applied to this ore weight if given biome or biome tag is encouraged. If weight value plus this modifier for biome is below or equal to zero, vein will not be generated. By default, biome doesn't affect weight of this vein. For more information, see below.

  • dimension_filter (optional) - defines filter of dimensions in which this ore vein is allowed to generate. By default, this vein will generate in all surface worlds. For more information, see below.

  • generation_predicate (optional) - defines block states which are allowed to be replaced by this vein (formally, all blocks in which this vein can generate). By default, it generates in stones blocks. For more information, see wiki page about worldgen filters.

  • surface_stone_material (optional) - specifies metal material name which stones will be generated on surface to indicate this vein's existence nearby. By default, stones are not generated.

  • name (optional) - name shown on JEI Ore Generation page, long name will be cut off

  • description (optional) - description shown for selected ore on JEI Ore Generation page, long descriptions will be split to multiple lines

  • filler - defines structure of blocks generated in this vein, their layout and types. For more information, see wiki page about worldgen fillers.

  • generator - defines shape of vein, it's minimal and maximal sizes, special generation flags. For more information, see about worldgen generators.

Biome Modifiers

Biome modifiers are specified in biome_modifiers root field and aims to provide different vein weight values for different biomes or biome dictionary tags. It is advised to use biome dictionary tags for better compatibility with other biome-adding mods. List of default biome dictionary tags with their descriptions.

Biome modifier structure as follows:

"biome_modifier": {
    //specifies that entries below are map of biome name to it's weight modifier
    "type": "biome_map",
    //50 will be added to vein weight in extreme hills biome. minecraft: is optional for vanilla biomes
    //but specifies modid of biome adder for biomes from other mods.
    "minecraft:extreme_hills": 50, 
    //500 will be subtracted from vein weight in ocean. If vein weight
    //is less or equal to 500, vein will not be generated at all in ocean biome.
    "minecraft:ocean": -500  
}
"biome_modifier": {
    //specifies that entries belos are map of biome dictionary tag name to it's weight modifier.
    //Biome tags can be added both by minecraft forge or mods. Every biome has at least one tag.
    "type": "biome_dictionary"
    //100 will be added to vein weight if it's generated in biome tagges as wet.
    "WET": 100, 
    //#200 will be added if biome is tagged as river biome.
    //If it is also tagged as wet, which is true for almost all river biomes, 300 will be added to weight in total.
    "RIVER": 200
}

Dimension Filter

Dimensions filter decides in which dimensions this ore vein should generate and in which it shouldn't. Generally it is dimension whitelist, but may also act like blacklist using pattern matching. It is defined as json array of string values. Following string values are allowed:

  • "is_surface_world" - allows generation in any surface world
  • "is_nether" - allows generation in any nether world
  • "dimension_id:1" - allows generation in dimension with id "1"
    • second ':' can be specified and then this filter will act as range of ids from first to last included, in case first or last id is not provided MIN and MAX dimension id will supplied respectively
  • "name:some_world" - allows generation in dimension with name "some_world",
  • "provider_class:WorldProviderMars" - allows generation in all dimension which provider class simple name is "WorldProviderMars" (galacticraft mars)
  • "name:[regex] - allows generation in all dimension which names match supplied regex [regex]. All symbols after first '' is interpreted as regex definition.
  • "provider_class:[regex] - allows generation in all dimension which provider class matches supplied regex [regex]. All symbols after first '' is interpreted as regex definition.