The options to use for generating ores.

interface OreGenerationOptions {
    biome: TerrainGeneratorBiome;
    chunkBounds: BoundingBox;
    corner1: Vector3;
    corner2: Vector3;
    dimension: Dimension;
    includedCategories?: { blob?: boolean; ore?: boolean };
    minMSBetweenTickWaits?: number;
    noise?: {
        noise2D: NoiseFunction2D;
        noise3D: NoiseFunction3D;
        noise4D: NoiseFunction4D;
    };
    offset?: Partial<Vector3>;
    oreGenerationMode?: "v1" | "v2";
    orePalette?: OreTypes;
    oreTypes?: OreTypes;
    scale?: Partial<Vector3>;
    seed: number;
}

Properties

The biome type to generate ores for.

This will determine what ore and blob types spawn, as well as their frequencies and distributions.

chunkBounds: BoundingBox

The chunk to generate ores for.

The ores can extend past the chunk as long as it is within the corner1 to corner2 range, but their centers will all be within this chunk.

corner1: Vector3

The first corner for the bounds to actually generate ores in.

This will not affect the actual layout of the ores, ores that are outside of this range just won't be generated.\

It is recommended to set this to extend at least a little bit past the chunk so that ores won't be cut off at the chunk boundaries.

corner2: Vector3

The second corner for the bounds to actually generate ores in.

This will not affect the actual layout of the ores, ores that are outside of this range just won't be generated.

It is recommended to set this to extend at least a little bit past the chunk so that ores won't be cut off at the chunk boundaries.

dimension: Dimension

The dimension to generate the ores in.

includedCategories?: { blob?: boolean; ore?: boolean }

The categories of ores to generate.

If not specified, it will generate all ore categories.

{
blob: true,
ore: true,
}
minMSBetweenTickWaits?: number

Minimum amount of time in milliseconds to spend generating the ores each tick.

config.system.defaultMinMSBetweenTickWaits
noise?: {
    noise2D: NoiseFunction2D;
    noise3D: NoiseFunction3D;
    noise4D: NoiseFunction4D;
}

The noise functions to use.

If not specified, it will generate it based off of the seed.

getNoise(seed)
offset?: Partial<Vector3>

The offset to use for the noise functions.

The actual block positions will not be offset, instead it will offset the coordinates passed into the noise functions.

{x: 0, y: 0, z: 0}
oreGenerationMode?: "v1" | "v2"

The ore generation mode to use.

v1 is more cubic.

v2 is more elliptic.

"v2"
orePalette?: OreTypes

The types of ores and blobs to generate.

Unlike OreGenerationOptions.oreTypes, this will be evaluated and filtered based on the biome and other settings.

Only applied if OreGenerationOptions.oreTypes is not specified.

(oreTypes as OreTypesType).filter(
(blockTypeData) =>
(blockTypeData.biomes === "All" ||
("not" in blockTypeData.biomes ? !blockTypeData.biomes.not.includes(biome) : blockTypeData.biomes.includes(biome))) && includedOreFeatureCategories[blockTypeData.oreFeatureCategory]
)
oreTypes?: OreTypes

The types of ores and blobs to generate.

This will override any biome-specific ore configurations and the includedCategories option.

To presere these settings use orePalette instead.

scale?: Partial<Vector3>

The scale to use for the noise functions.

The actual block positions will not be scaled, instead it will scale the coordinates passed into the noise functions.

{x: 0, y: 0, z: 0}
seed: number

The seed to use for the ore generation.