Files
horizon-airdef/docs/biome-temperatures.md
T
Ludovic Marie cb19660fbe Build Horizon Rust parity foundations and differential validation
Add version-bound core, world data, geometry, generation and feature implementations with native client/server comparison tools and scoped evidence reports. Apply Horizon project branding.

Workspace tests, Clippy and 147 Python tests passed. Full 51-family survival and expanded provider comparisons are still running; complete gameplay parity and a playable Rust client remain unfinished. Private game artifacts and the isolated simple-block placement work are excluded.
2026-10-06 11:24:51 +02:00

2.1 KiB

Biome temperatures

Horizon implements Java Edition 26.3 biome temperature sampling, including the frozen modifier, height adjustment, rain/snow thresholds, precipitation selection and the small frozen-ocean iceberg melt predicate. The fixed seeded simplex and noise-stack sources use the existing Rust noise implementation.

BiomeTemperatureSettings supplies the immutable inputs. BiomeTemperature is a per-biome, per-worker cache, corresponding to vanilla's thread-local cache. Its 1,024-entry insertion order does not change on hits. Keys use packed block positions and omit sea level, preserving both coordinate aliases and cached results across sea-level changes. NaN values are recomputed, including vanilla's eviction behavior when a cached NaN is queried at capacity.

Run python3 tools/test_biome_temperature_parity.py. The local report records 836,659 matching output lines per reference JAR over 387 fixtures, including 12 thread-isolation fixtures. The original Java transport invokes actual biome methods and inspects native ordered cache contents. Test inputs include arbitrary base-temperature bits, threshold neighbors, both modifiers, precipitation enabled/disabled, extreme coordinates, sea-level overflow, packed aliases, cache hits/eviction and actual native threads with separate Rust workers.

The oracle constructs native climate settings and biomes with only the fields these methods use. Climate-setting parsing now covers all 67 bundled biome definitions and 183 codec inputs, including float rounding, overflow, field validation and modifier defaults. Full biome codecs, climate encoding, world-dependent snow/ice placement, automatic thread-local ownership for a shared Rust biome object remain pending. Source/fixture hashes guard the comparison; raw reference artifacts stay private under .local.

Material temperature and biome conditions now use these climate settings and cached temperature calculations in a separate integration suite.