Commit graph

10 commits

Author SHA1 Message Date
f162698302 docs: monster rooms replayed; lakes and structure sets named next 2026-08-26 02:51:15 +03:00
9c7f02662f docs: attribute the residual parity gap to unreplayed pre-ore stages
The featureless capture settles what the 98.028% gap is made of: base
terrain is bit-exact, so the drift comes from air-writing features
(monster rooms, geode voids, lava lakes) that vanilla runs before the
ores and the region replay does not cover yet. Both files now point at
monster rooms as the next step instead of at carver and aquifer edges.
2026-08-26 02:06:45 +03:00
8d5cf5533b docs: sync fidelity status with the datapack feature replay
CLAUDE.md still claimed there was no placed/configured feature system and
that ores never generate below y=0; both stopped being true when the
stage-6 region replay landed. Document what the replay covers, which
decoration stays hand-written, the measured parity baseline, and the new
env-gated base-terrain diagnostic. README gains the same correction plus
the 966-cell base-terrain measurement.
2026-08-26 01:35:29 +03:00
be8f030698 Commit exhaustive vanilla worldgen fixture 2026-08-10 23:54:04 +03:00
ca019756ec Add vanilla parity harness and harden server boundaries 2026-08-10 22:54:16 +03:00
Master290
e0fdddd887 Write chunk NBT vanilla reads: flat root, byte section Y, four-bit block palettes
Our region files were not Anvil. Three things stood between them and vanilla's
deserializer, and each is enough on its own:

  * everything was nested under a "Level" compound. Chunk data lived there until
    1.18; SerializableChunkData builds a flat root and never looks for the key.
  * a section's Y was an Int. Vanilla writes putByte and reads getByteOr, so
    every section of ours decodes as index 0 and overwrites the one before it.
  * block palettes were packed at ceil(log2(size)) bits. Strategy's tableswitch
    routes bit counts 1 through 4 to the same four-bit configuration, so a
    palette of 2..16 states is four bits wide on disk. Ours were one to three,
    which makes the long array a quarter of the length vanilla computes, and
    SimpleBitStorage rejects the section outright rather than misreading it.

Biome containers were already right: Strategy has no such floor for them, and a
Global configuration above three bits still stores palette indices, just at its
own width. The suspicion that biomes collapsed on save/load was unfounded --
what let it stand is that every round-trip test in this package set blocks and
asserted blocks, so nothing proved biomes survived. They do now, per cell, for
every palette width a section can hold.

Verified against vanilla rather than against our reading of it:
tools/VanillaChunkFormatCheck.java opens a region file we wrote using vanilla's
RegionFile, NbtIo, Strategy and SimpleBitStorage. Sixteen generated chunks pass.
Reverting either the Y type or the palette floor makes it fail with vanilla's
own message -- "Invalid length given for storage, got: 64 but expected: 256" --
so the check can fail, which is the only reason to trust it passing.

Reading a world the official server generated is what the surface-height parity
capture in CLAUDE.md has always needed, and this is half of it.
2026-07-27 03:44:48 +03:00
Master290
7880531bdb Send three real heightmaps instead of one repeated three times
writeHeightmaps computed "highest non-air" once and wrote the same 37 longs
under all three ids, on the stated assumption that our terrain has no leaves or
transparency. That stopped being true the moment the generator grew trees and
flowers.

Vanilla's three client heightmaps stop at different blocks: WORLD_SURFACE at the
first thing that is not air, MOTION_BLOCKING at the first that blocks motion or
holds fluid, MOTION_BLOCKING_NO_LEAVES at the first such thing that is not a
LeavesBlock -- an instanceof, not the minecraft:leaves tag. The client places
rain and snow particles off MOTION_BLOCKING and lands a fishing bobber on it, so
a tree canopy reported as solid ground rains under itself.

Neither blocksMotion() nor the leaves test is derivable from blocks.json: the
first reads cached VoxelShape collision geometry and the forceSolidOn/Off
properties, the second is a Java class check. So the Java dumper grows three
flag bits and the whole thing is renamed for what it now is -- block state
properties, not just lighting. tools/VanillaBlockStateDump.java writes
internal/world/block_properties.bin at format 2; the light bytes are unchanged
byte for byte and only the previously unused high flag bits moved.

Verified the dumper round trip while doing it: recompiling the old
VanillaLightDump against the jar reproduces the committed binary exactly, so the
data really does come from the runtime registry and not from a stale checkout.
CLAUDE.md now carries the command to rebuild it.
2026-07-27 03:27:09 +03:00
Master290
4db7638377 Update the fidelity notes for the surface pass
The gap list described a surface pipeline that no longer exists: no subsurface
banding, surfaceDepth pinned at zero, six unsupported noises, no deepslate.
What is left is smaller and more specific — carvers, ore veins,
PerlinSimplexNoise, and the two SurfaceSystem extensions that run outside the
rule tree.

Also records the two things that are now compile-time errors rather than silent
wrong output: a surface rule naming a block the ID table does not have, and the
rule tree being used without a seed.
2026-07-27 02:32:05 +03:00
Master290
e77fe3dc07 Update the fidelity notes for the aquifer
The gap list still said aquifers were absent and that the water condition used
sea level, and it did not mention deepslate never being placed -- which is the
loudest thing gendump prints now that the fluids are right.
2026-07-27 02:06:45 +03:00
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