Skip to main content

Module climate

Module climate 

Source
Expand description

Climate system for biome selection. Climate system for biome selection in world generation.

This module implements vanilla Minecraft’s Climate system for biome lookup. Climate parameters (temperature, humidity, etc.) are quantized to long integers and used to find the best matching biome from a parameter space.

§Key Types

  • [TargetPoint] - A sampled climate point with 6 quantized parameters
  • [Parameter] - A parameter range (min/max) for biome matching
  • [ParameterPoint] - Full biome parameter specification
  • [ParameterList] - Collection of biomes with their parameter points

Modules§

parameter_list 🔒
R-Tree backed parameter list for climate-based biome lookup.
types 🔒
Climate types for biome selection.

Structs§

Parameter
A parameter range for biome matching.
ParameterList
A list of biome parameter points with their associated values.
ParameterPoint
A biome’s full parameter specification.
TargetPoint
A target point representing sampled climate values.

Constants§

PARAMETER_COUNT
Number of climate parameters (temperature, humidity, continentalness, erosion, depth, weirdness, + offset).
QUANTIZATION_FACTOR
Quantization factor used to convert floats to longs. This is the exact value from vanilla Climate.java.

Functions§

quantize_coord
Quantize a coordinate value to a long integer.
unquantize_coord
Unquantize a long integer back to a float.