Ore Configuration
Add world-generation placement rules (vein size, abundance, altitude, biomes) to an existing block.
Ore configuration doesn’t register a new block — it takes a block name that’s already registered (via block-config.yaml) and gives it world-generation placement rules: which biomes it can appear in, what altitude range, and how dense its veins are. This is how ore veins, gemstones, and any other biome-restricted, altitude-restricted block get placed during world generation.
File Location
Register the file in your mod’s manifest (mods/<YourMod>/<YourMod>.yaml):
ore-config: ore-config.yaml
Then create the file it points to, relative to your mod’s folder:
mods/<YourMod>/ore-config.yaml
The file is a single list of ore entries:
ores:
- name: my_ore_block
biomes:
- YourMod:my_biome
name must match an already-registered block name, prefixed with your mod name unless it already contains a colon — same convention as every other catalog file.
Minimal Example
ores:
- name: my_ore_block
min-altitude: -50
max-altitude: 0
abundance: 0.15
biomes:
- YourMod:my_biome
Fields
| Field | Default | Description |
|---|---|---|
name | (required) | The block name to place — must already be registered in block-config.yaml. |
min-altitude | (unbounded) | Lowest world-Y this ore can spawn at. Omit for no lower bound. |
max-altitude | (unbounded) | Highest world-Y this ore can spawn at. Omit for no upper bound. |
min-depth-factor | 0.0 | Lowest normalized within-world depth this ore can spawn at (0.0 = surface/top, 1.0 = world floor). An extra gate on top of min-altitude/max-altitude. The world’s depth reference is set per world-builder preset (world-floor-y, and world-ceiling-y for cave worlds). |
max-depth-factor | 1.0 | Highest normalized within-world depth this ore can spawn at. Leave min/max-depth-factor at their defaults for no depth restriction. |
noise-scale | 1.0 | Noise sampling scale — higher values produce smaller, more frequent veins; lower values produce larger, sparser ones. Give a single number to scale both axes equally (the usual case), or a { x, y } map to scale each axis separately, which stretches veins along one axis. |
abundance | 0.1 | The fraction of eligible positions (inside the altitude/biome restrictions) that become this ore, from 0.0 (never) to 1.0 (every eligible block). This is a true, calibrated fraction: 0.1 really does fill ~10% of eligible positions, independent of the noise-scale values. |
deep-abundance | (none) | Optional deep-end abundance. When set, effective abundance ramps linearly across the depth band — from abundance at min-depth-factor to deep-abundance at max-depth-factor — so richness scales with depth (set it above abundance for “deeper = richer”). Omit it to keep abundance flat. |
biomes | (none) | Which biome names this ore can spawn in. An ore with no biomes never spawns. |
Complete Example
Based on the real shipped ore config:
ores:
- name: coal_ore
min-altitude: -50
max-altitude: 0
noise-scale: 0.1
abundance: 0.1
biomes:
- plains
- desert
- forest
- name: iron_ore
min-altitude: -50
max-altitude: 0
noise-scale: 0.05
abundance: 0.05
biomes:
- plains
- desert
- forest
Stretched Veins
Pass noise-scale as a { x, y } map to scale each axis independently. A low x and higher y
sample the noise slowly across and quickly down, producing wide, flat, horizontally-banded veins:
ores:
- name: marble
min-altitude: -80
max-altitude: -20
noise-scale: { x: 0.02, y: 0.08 }
abundance: 0.08
biomes:
- plains
Depth-Scaled Ore (deeper = richer)
Use the normalized depth band plus deep-abundance to make an ore rarer near the top of its band and
richer toward the world floor. The example gems appear only below the mid-point of the world and ramp
from ~2% of eligible positions at that depth to ~12% at the floor:
ores:
- name: deep_gem
min-altitude: -3000
max-altitude: 0
min-depth-factor: 0.5
max-depth-factor: 1.0
noise-scale: 0.06
abundance: 0.02
deep-abundance: 0.12
biomes:
- cave_deep
The depth axis (0.0 at the top, 1.0 at the floor) is defined per world-builder preset by
world-floor-y (and world-ceiling-y on cave worlds). Ores whose min/max-depth-factor are left at
their defaults ignore depth entirely and behave exactly as before.
The altitude keys above are shown for illustration but are not needed when gating on depth: both
bands are ANDed, and min/max-altitude default to unbounded. The usual pattern for a depth-banded
ore is to set the depth keys and omit the altitude keys entirely, letting depth be the only gate.
Last updated