RegionIO/internal/worldgen
Master290 c19e5f0e4f Bind the surface rule tree to the world seed
The tree was parsed once, globally, and shared by every world -- so every
condition that needs the seed simply did not work. Compiling it per RandomState
fixes four of them at once.

noise_threshold sampled a per-column random draw and pretended it was
"minecraft:surface"; the other six noises it names were unsupported and returned
false. Each condition now holds its own seeded noise, sampled once per column
into a small cache the way vanilla's LazyXZCondition does. Powder snow, packed
ice and ice appear in the dump for the first time; calcite, swamp water windows
and gravel patches have their conditions back too.

vertical_gradient tapered through a per-column RNG shared with the other rules.
Vanilla rolls a positional random at the exact block, from a factory named by
the rule. More importantly the anchor decoder read only above_bottom and
discarded which kind of anchor it was, so the deepslate rule's absolute 0..8
collapsed onto y=-64 and **no deepslate existed anywhere in the world**. Anchors
now carry their kind and resolve against the real height bounds -- which also
retires a hardcoded 384 in y_above.

Two more stubs land with them: hole is surfaceDepth <= 0 rather than a constant
false, and steep reads the neighbouring column heights. steep needs the whole
chunk's heightmap, so the column pass is now two passes -- terrain and fluids
for all 256 columns, then surface rules -- which is the order vanilla uses
anyway (doFill, then buildSurface).

Deepslate was also missing from the block-ID table, and an unknown name resolved
to 0, which the caller read as "no block" and skipped. So even a correct rule
would have placed nothing. Unknown names are now a parse error, deepslate and
mud are in the table, and a rule that resolves to air genuinely places air --
the frozen-ocean surface asks for exactly that.

Below y=0 is now entirely deepslate, y=1..7 a scatter, above y=8 none.
2026-07-27 02:25:09 +03:00
..
data Add StructureManager and NBT template loader for large structures 2026-06-27 21:28:11 +03:00
aquifer.go Implement the vanilla Aquifer; stop flooding caves 2026-07-27 02:02:12 +03:00
biome.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
biome_test.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
blended.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
blended_test.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
blendedcompute_test.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
blockids.go Bind the surface rule tree to the world seed 2026-07-27 02:25:09 +03:00
climate_sampler.go 3D per-cell biomes (4x4x4) with surface/underground/cave layers 2026-06-24 01:04:01 +03:00
density.go Parse aquifer and ore-vein noise routers 2026-07-27 01:44:45 +03:00
density_bench_test.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
generated_blocks.go Add StructureManager and NBT template loader for large structures 2026-06-27 21:28:11 +03:00
improved_noise.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
improved_noise_test.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
loader.go Bind the surface rule tree to the world seed 2026-07-27 02:25:09 +03:00
loadtest_test.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
noise_test.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
normal_noise.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
perlin_noise.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
random.go Parse aquifer and ore-vein noise routers 2026-07-27 01:44:45 +03:00
random_test.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
randomstate.go Restore the subsurface layers: real above_preliminary_surface and surface depth 2026-07-27 02:15:14 +03:00
router_test.go Parse aquifer and ore-vein noise routers 2026-07-27 01:44:45 +03:00
simple.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
spline.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
structure.go Bind the surface rule tree to the world seed 2026-07-27 02:25:09 +03:00
structure_manager.go Fix structures tearing apart and floating due to inconsistent baseY calculations 2026-06-27 21:54:08 +03:00
surface.go Bind the surface rule tree to the world seed 2026-07-27 02:25:09 +03:00
surface_level.go Parse aquifer and ore-vein noise routers 2026-07-27 01:44:45 +03:00
surface_system.go Restore the subsurface layers: real above_preliminary_surface and surface depth 2026-07-27 02:15:14 +03:00
surface_test.go Bind the surface rule tree to the world seed 2026-07-27 02:25:09 +03:00
template_cache.go Add StructureManager and NBT template loader for large structures 2026-06-27 21:28:11 +03:00