Skip to main content

Module ore_veinifier

Module ore_veinifier 

Source
Expand description

Ore vein generation during terrain fill.

Matches vanilla’s OreVeinifier. Evaluates the three vein density functions (vein_toggle, vein_ridged, vein_gap) per solid block to decide whether to replace stone with copper/iron ore, raw ore blocks, or filler (granite/tuff).

StructsΒ§

OreVeinifier
Ore vein generator. Holds cached block state IDs and the positional random splitter used for per-block randomness.
VeinType πŸ”’
A vein type with its Y range and block variants.

ConstantsΒ§

CHANCE_OF_RAW_ORE_BLOCK πŸ”’
Probability of placing a raw ore block instead of ore.
EDGE_ROUNDOFF_BEGIN πŸ”’
Within this many blocks of the vein type’s Y boundary, the threshold tightens.
MAX_EDGE_ROUNDOFF πŸ”’
Maximum tightening applied at the very edge of the Y range.
MAX_RICHNESS πŸ”’
Maximum richness (at veininess >= 0.6).
MIN_RICHNESS πŸ”’
Minimum richness (at veininess = 0.4).
SKIP_ORE_IF_GAP_BELOW πŸ”’
Vein gap noise must be above this to place ore (otherwise filler).
VEININESS_THRESHOLD πŸ”’
Veininess magnitude must exceed this (after edge roundoff) to place any vein block.
VEIN_SOLIDNESS πŸ”’
Probability of NOT skipping a vein block (nextFloat must be <= this).