Oregen template docs

Partly taken from here and improved by reading the source code.

Index


What's here:

  1. Basic template
  2. Special Syntax
    1. Block lists
  3. Parameter description
    1. "name"
    2. "template"

Example


This example only shows the parameters parsed every time. Different template types may add additional required parameters.

{
    "name": {
        "template": "...",
        "block": "minecraft:air",
        "material": "minecraft:stone",
        "clusterSize": 0,
        "numClusters": 0,
        "chunkChance": 1,
        "biomeRestriction": "none",
        "biomes": [],
        "dimensionRestrictions": "blacklist",
        "dimensions": [-1, 1],
        "retrogen": false,
        "enabled": false
    }
}

Special syntax


Block lists

Whenever a parameter is a list of blocks, there are different possible notations. Consider these basic exampes:

"block": "minecraft:air",
"block": {"name": "ThermalFoundation:Ore", "metadata": 1},
"block": [
    {"name": "ThermalFoundation:Ore", "metadata": 2, "weight":80}
    {"name": "ThermalFoundation:Ore", "metadata": 3, "weight":20},
],

The first example is just a string. If no metadata or weight is needed, this is enough. You can also put multiple block strings in a list.
This is particularly usefull for the "material" parameter.

The second example shows how to specify metadata. Still no list is needed for a single entry.

The third example shows the usage of weight. It specifies the percentage of blocks created as this block. Of course metadata is not required for this to work.

Parameters


"name"

Just the name of the json object.

Can be any string, but must be unique per file.

"template"

The generation method used.

Can have these Forms:

"template": "...",
"template": {"type": "...", "generator": "..."},

The first form can be used, if the default generator is preferred.

The template dict can contain additional keywords specifying parameters for the generator

Relevant files:

"type"

Where to generate.

Lots of options are available:

"uniform"

Uniform distribution between minHeight and maxHeight.

  • Required extra keys:
    • minHeight
    • maxHeight
  • Default generator:
    • cluster

"normal"

Normalized distribution between meanHeight + maxVariance and meanHeight - maxVariance, more dense in the center and less dense near the limits.

  • Required extra keys:
    • meanHeight
    • maxVariance
  • Default generator:
    • cluster

"fractal"

Normalized distribution vertically and horizontally.

  • Key usage:
    • clusterSize: Limit size of a cluster (effects on generator rather than type?)
    • numClusters: number of clusters. Reduces individual cluster size.
  • Required extra keys:
    • minHeight: bottom of generation
    • veinHeight: vertical diameter
    • veinDiameter: horizontal diameter
    • verticalDensity: higher number means more dense (tightly packed)
    • horizontalDensity: --||--
  • Default generator:
    • large-vein
      Notes: Best set "numClusters": 1 and chunkChance: >= 9

"surface"

Generate at the surface.

  • Optional extra keys:
    • followTerrain: boolean, if true, follow ground level, else use highest available block. default: false
  • Default generator:
    • cluster
  • Default material:
    • biome specific

"decoration"

Generate at the surface.

  • Optional extra keys:
    • followTerrain
    • genSky
    • checkStay
    • stackHeight
    • xVariance
    • yVariance
    • zVariance
  • Default generator:
    • decoration
  • Default material:
    • minecraft:air

"underfluid"

Generate beneath fluids.

  • Optional extra keys:
    • genFluid: list of fluid blocks to generate under. default: minecraft:water
  • Default generator:
    • cluster
  • Default material:
    • minecraft:dirt
    • minecraft:grass

"cave"

Generate like caves. Unfinished?

  • Required extra keys:
    • ceiling: boolean, whether the generation is prohibited from breaking through the surface.

"generator"

Form of the generated feature.

Lots of options are available:

"cluster"

Roughly round blob.

"sparse-cluster"

Same as cluster, but clusterSize below 4 to affect generation.

"large-vein"

Cluster of clusters.

  • Optional extra template keys:
    • sparse: boolean, spread small clusters out more. default: true

"geode"

Blob with a shell and a core. Does not work?

  • Optional extra template keywords:
    • crust: list of blocks. default: minecraft:stone
    • filler: list of blocks. default: nothing
    • hollow: boolean, whether the inner core should be air. default: false

"boulder"

Sphere.

  • Optional extra template keys:
    • sizeVariance: Real size = clusterSize + {0, ..., sizeVariance}. default: 2
    • count: How many boulders to generate per batch. default:3
    • countVariance: Real count of batch = count + {0, .., countVariance}. default: 0
  • Notes:
    • Can not spawn in air.
    • clusterSize == radius

"spike"

Similar to Vanilla ice-spike biome spikes.

  • Optional extra template keys:
    • largeSpikes: boolean, default: true
    • largeSpikeChance: default: 60
    • minHeight: default: 7
    • heightVariance: default: 4
    • sizeVariance: default: 2
    • positionVariance: default: 4
    • minLargeSpikeHeightGain: default: 10
    • largeSpikeHeightVariance: default: 30
    • largeSpikeFillerSize: default: 1
  • Notes:
    • Will not spawn in air but find closest non-air block below.

"stalagmite"

Blablabla.

  • Optional extra template keys:
    • genBody: list of blocks, default: minecraft:air
    • minHeight: default: 7
    • heightVariance: default: 4
    • sizeVariance: default: 2
    • heightMod: default: 5
    • genSize: default: 0
    • smooth: boolean, default: false
    • fat: boolean, default: true
    • altSinc: boolean, default: false

"statactite"

Blablabla.

  • Optional extra template keys:
    • genBody: list of blocks, default: minecraft:air
    • minHeight: default: 7
    • heightVariance: default: 4
    • sizeVariance: default: 2
    • heightMod: default: 5
    • genSize: default: 0
    • smooth: boolean, default: false
    • fat: boolean, default: true
    • altSinc: boolean, default: false

"lake"

Lake.

  • Optional extra template keys:
    • useMaterial: boolean, default: false
    • outlineWithStone: boolean, default:false
    • outlineBlock: list of blocks
    • gapBlock: list of blocks, default: minecraft:air
    • solidOutline: boolean, default: false
    • totaloutline: boolean, default: false
  • Notes:
    • Can not spawn in air.

"small-tree"

Trees. Does not work?

  • Optional extra template keys:
    • leaves: list of blocks, default: null
    • minHeight: default. 5
    • heightVariance: default: 3
    • treeChecks: boolean, default: true
    • relaxedGrowth: boolean, default: false
    • waterLoving: boolean, defaut: false
    • genSurface: list of blocks, default: null (no restrictions)