RegionIO/internal/world
Master290 90e9380ae7 Stop the saved world from masking generator changes
chunkAt prefers the store over the generator, and nothing invalidated a stored
chunk when the generator changed. Combined with four region files committed to
the repo, the chunks around spawn were frozen output from an older generator:
worldgen fixes looked like they did nothing in exactly the area you land in when
you join, and a fresh clone inherited that world.

Chunks now carry a RegionIOGeneratorVersion stamp, written on save and checked on
load; a mismatch returns ErrChunkNotFound so the caller regenerates. Chunks
written before the stamp existed have no tag, decode as 0, and are invalidated
the same way. Bump the constant in any commit that changes generator output.

This is deliberately per-chunk and deliberately quiet. The world metadata file
already guards the seed, where a mismatch means two incompatible terrains and
refusing to open is right. A generator change is routine by comparison and should
just regenerate.

world/region/*.mca and chat.md are untracked (left on disk) and /world/ is
gitignored, superseding the narrower /world/regionio-world.json rule, along with
/.refjava/ and root-level session transcripts.

CLAUDE.md covers the parts of working here that README does not: the
no-dependencies rule, the version-stamp rule and why forgetting it looks like a
failed fix, where the vanilla ground truth lives and how to query the jar
directly with unzip and javap, the precedent for dumping runtime constants with a
throwaway Java program, and an honest list of which layers are bit-exact versus
approximated.
2026-07-27 01:28:05 +03:00
..
testdata Implement multiplayer persistence and vanilla lighting 2026-07-21 09:21:44 +03:00
bench_test.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
biome_3d_test.go 3D per-cell biomes (4x4x4) with surface/underground/cave layers 2026-06-24 01:04:01 +03:00
biome_bench_test.go 3D per-cell biomes (4x4x4) with surface/underground/cave layers 2026-06-24 01:04:01 +03:00
biome_lookup.go Biome-aware surface rules from the vanilla rule tree 2026-06-24 19:44:07 +03:00
biome_lookup_test.go 3D per-cell biomes (4x4x4) with surface/underground/cave layers 2026-06-24 01:04:01 +03:00
biome_parameters.json Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
blocks.json Chunk persistence to Anvil .mca region files 2026-06-25 00:40:14 +03:00
cache.go Fix terrain streaming and surface spawning 2026-07-21 11:11:19 +03:00
cache_light.go Fix terrain streaming and surface spawning 2026-07-21 11:11:19 +03:00
cache_light_reuse_test.go Fix terrain streaming and surface spawning 2026-07-21 11:11:19 +03:00
cache_test.go Implement multiplayer persistence and vanilla lighting 2026-07-21 09:21:44 +03:00
cache_tickets.go Implement ticketed chunk lifecycle 2026-07-21 10:04:56 +03:00
cache_tickets_test.go Implement ticketed chunk lifecycle 2026-07-21 10:04:56 +03:00
chunk.go Implement multiplayer persistence and vanilla lighting 2026-07-21 09:21:44 +03:00
compress.go Implement multiplayer persistence and vanilla lighting 2026-07-21 09:21:44 +03:00
encode.go Write biome palettes in the form the client actually reads 2026-07-27 01:28:04 +03:00
encode_test.go Write biome palettes in the form the client actually reads 2026-07-27 01:28:04 +03:00
entity.go Implement multiplayer persistence and vanilla lighting 2026-07-21 09:21:44 +03:00
features.go Implement multiplayer persistence and vanilla lighting 2026-07-21 09:21:44 +03:00
golden_test.go Implement multiplayer persistence and vanilla lighting 2026-07-21 09:21:44 +03:00
item_blocks.json Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
items.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
light.go Implement ticketed chunk lifecycle 2026-07-21 10:04:56 +03:00
light_properties.bin Implement multiplayer persistence and vanilla lighting 2026-07-21 09:21:44 +03:00
light_properties.go Implement multiplayer persistence and vanilla lighting 2026-07-21 09:21:44 +03:00
light_test.go Implement multiplayer persistence and vanilla lighting 2026-07-21 09:21:44 +03:00
regionfile.go Implement multiplayer persistence and vanilla lighting 2026-07-21 09:21:44 +03:00
spawn_surface_test.go Fix terrain streaming and surface spawning 2026-07-21 11:11:19 +03:00
state_names.go Fix terrain streaming and surface spawning 2026-07-21 11:11:19 +03:00
store.go Stop the saved world from masking generator changes 2026-07-27 01:28:05 +03:00
store_test.go Stop the saved world from masking generator changes 2026-07-27 01:28:05 +03:00
surface_verify_test.go Biome-aware surface rules from the vanilla rule tree 2026-06-24 19:44:07 +03:00
terrain.go Implement multiplayer persistence and vanilla lighting 2026-07-21 09:21:44 +03:00
terrain_bench_test.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
terrain_debug_test.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
vanilla.go Fix the bedrock floor ramp and add a gendump check for it 2026-07-27 01:28:04 +03:00
vanilla_bench_test.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00
vanilla_parity_test.go Initial commit: RegionIO Minecraft server core (26.1.2/protocol 775) 2026-06-24 00:32:51 +03:00