Commit graph

84 commits

Author SHA1 Message Date
90eb08f37d world: ruined portal stub matches vanilla's saved start bit-for-bit
Three fixes close the loop against the captured region file: the giant
roll precedes the template draw, surfaceY is the topmost non-air block
(getHeight already returns one past it), and structure biome refs
resolve through has_structure/ tags to the extracted tag files. The
weighted variant pick walks a fresh per-attempt GenerationContext
stream while failed entries drop from the pick stream without reseeding.

TestRuinedPortalStubMatchesVanillaStart pins chunk (1,0) to vanilla's
own saved start: portal_6, CLOCKWISE_90, mirror NONE, air pocket,
template position (16,12,0) — and asserts the neighbouring fixture
chunks stay portal-free.
2026-08-26 14:42:18 +03:00
798a3ec7b4 world: port ruined portal generation point and expose pre-carve terrain
generateBaseTerrain now factors the noise+surface stage out of chunk
generation so structure placement can read pre-carve heights exactly
like vanilla's STRUCTURE_STARTS stage. RuinedPortalGenerationPoint
replays the ruined_portals set: the weighted pick across all seven
variants on its own stream, each attempt's setup/template/rotation/
mirror draws on a fresh GenerationContext stream (makeRandom reseeds
per attempt, confirmed from bytecode), findSuitableY with corner-column
settle scan against those heights, and the post-draw 3D-biome filter at
quart-snapped coordinates.

Known gap, documented in STRUCTURE_NOTES.md: no variant is accepted in
the window around the fixture's portal yet while vanilla placed one;
the biome/surface inputs need a vanilla-side probe to bisect. Not wired
into the production replay until that closes.
2026-08-26 13:56:51 +03:00
6e04bd8bbc docs: ruined portal seeding chain and postProcess map 2026-08-26 11:41:23 +03:00
482654bf7a worldgen: load structure templates and transform them like vanilla
LoadResolvedTemplate parses the extracted .nbt files with every palette
entry resolved to concrete state IDs through an injected resolver, and
TransformBlockPos reproduces StructureTemplate.transform's mirror-then-
rotate order around the pivot, including all three quarter-turn cases
read off the bytecode. MthGetSeed gives processors their per-block
positional Legacy stream. Verified against the real ruined_portal
templates: every block lands inside the declared size for all eight
mirror/rotation combinations.
2026-08-26 11:40:23 +03:00
3eaa9d834e docs: structure port notes from the jar bytecode
Captures the decoded placement grid, the four legacy frequency reducers,
the full ruined-portal findGenerationPoint and findSuitableY algorithms
with their exact draw order, the template name arrays, and the fixture
marker coordinates that pin the grid to vanilla. This is the working map
for the piece-placement ports that follow.
2026-08-26 10:39:28 +03:00
c488ce274f worldgen: parse structure sets and place them on the vanilla grid
Loads the 26.1.2 structure datapack: 20 structure sets, 34 structure
definitions, and the worldgen biome tags they reference. Random-spread
placement follows RandomSpreadStructurePlacement byte for byte — region
floorDiv by spacing, one Legacy stream salted per region, two
spread-type draws for the offset — and the four legacy frequency
reducers keep their exact draws, including the hardcoded buried-treasure
salt and the outpost's discarded full-range int.

Verified against the fixture: on seed 12345 the ruined_portals set
claims exactly chunk (1,0), the chunk whose captured blocks carry the
ruined portal's obsidian, gold, and crying obsidian. TestStructure-
PlacementGrid pins that plus village separation invariants.
2026-08-26 10:33:10 +03:00
790d7e3144 world: replay stage-3 monster rooms
Ports MonsterRoomFeature from bytecode with vanilla draw order and loop
structure: shell validation (solid floor and ceiling, one to five open
side columns), interior cave_air carving, cobblestone walls with the
mossy three-in-four floor roll drawn only where vanilla draws it, chest
placement faced away from its single opaque neighbour with the loot-seed
long consumed even though block entities are not modelled yet, and the
spawner's one-draw mob pick. Writes go through Feature.safeSetBlock
semantics against #minecraft:features_cannot_replace, captured verbatim
from the jar into the embedded datapack data.

The pass slots between geodes and the ores so the rooms' cave_air
pockets exist before ore ellipsoids roll their air-exposure discards.
The committed fixture's four chunks happen to contain no dungeons, so
measured parity holds at 98.028%, but the generator's output can differ
elsewhere: generatorVersion bumps to 22.
2026-08-26 02:49:33 +03:00
f0a7cf815d world: prove undecorated base terrain bit-exact against vanilla
TestVanillaBaseTerrainParity compares our noise+surface+carver+aquifer+
vein pipeline against a vanilla capture whose biomes carry no features
and no structure sets: all 393,216 cells match. The plain-state fixture
mismatches the base-terrain diagnostic used to attribute to carver or
aquifer defects are therefore feature outputs wearing plain states —
monster-room cave_air, geode voids, lava-lake lava — and its doc comment
now says so.
2026-08-26 02:06:31 +03:00
524f5567cb world: add base-terrain mismatch classification diagnostic
Splits fixture mismatches into classes that name the responsible
subsystem: plain-vs-plain cells are direct base-terrain defects and come
with sample coordinates, single-side feature states count as flips per
family, and disk-shaped outputs land in an ambiguous bucket so they
cannot pollute the plain signal.

First run on seed 12345: 966 base cells (0.246%), dominated by vanilla-
carved cave segments missing from our carver output and deepslate-to-
water aquifer edges.
2026-08-26 01:31:08 +03:00
1f097de233 world: drop dead per-type feature replay wrappers
The combined stage-6 pass in placeScheduledUndergroundOresStage already
replays ores, underwater magma, and disks in datapack order; the separate
placeScheduledDisks and placeScheduledUnderwaterMagma passes have no
callers left. Keep the per-position helpers the combined pass and tests
use.
2026-08-26 01:30:57 +03:00
c4be38acdd world: publish decorated region batches 2026-08-25 10:24:19 +03:00
d8b5d0f79b world: replay datapack features across regions 2026-08-25 10:24:19 +03:00
f1d1d109f4 worldgen: parse configured feature definitions 2026-08-25 10:24:19 +03:00
fd32c65da9 worldgen: add vanilla biome search and decoration RNG 2026-08-25 10:24:19 +03:00
b8c57be2f7 Add vanilla base batch generator 2026-08-18 01:43:55 +03:00
9a38622747 Test batch cache persistence 2026-08-18 01:34:36 +03:00
d804dc11f1 Coalesce overlapping chunk batches 2026-08-18 01:24:20 +03:00
3f0f1f70b9 Publish generated chunk batches 2026-08-18 00:58:12 +03:00
641da0e078 Bound placed ore verification 2026-08-17 22:52:59 +03:00
56a1a5f8d6 Bound tree stage verification 2026-08-17 22:28:55 +03:00
a2ee6f6a8f Measure single-chunk ore transition 2026-08-17 22:12:49 +03:00
798016b055 Preserve lazy feature placement RNG 2026-08-17 18:29:10 +03:00
aeb7e4d2c2 Keep race world tests within timeout 2026-08-17 18:05:13 +03:00
2cf6ab4775 Preserve trapezoid height plateaus 2026-08-17 14:16:34 +03:00
4fa0a5e554 Match very biased height sampling 2026-08-17 10:56:05 +03:00
8e73993adf Measure per-feature ore parity 2026-08-17 10:18:18 +03:00
a24ffb98f3 Compare ore feature biome orders 2026-08-17 01:47:10 +03:00
51b4891f81 Diagnose ore feature seed indices 2026-08-17 01:37:40 +03:00
cb60050801 Match vanilla ore sphere math 2026-08-17 01:14:24 +03:00
c68c5c2744 Match vanilla ore block traversal 2026-08-17 00:45:32 +03:00
400e76382a Report fixture ore schedules 2026-08-11 14:01:40 +03:00
e2f496fafc Measure cross-chunk ore replay 2026-08-11 13:50:14 +03:00
9ffd2b19ba Place scheduled ores across regions 2026-08-11 13:35:47 +03:00
d01e576dcc Schedule features from mutable regions 2026-08-11 13:23:45 +03:00
4ff62d7c96 Evaluate world-aware block predicates 2026-08-11 13:13:02 +03:00
1a921434d9 Model mutable feature regions 2026-08-11 13:01:52 +03:00
ea66091f85 Schedule source chunk features globally 2026-08-11 12:47:59 +03:00
11440f556c Execute world-aware placement modifiers 2026-08-11 12:33:35 +03:00
053c5bec6a Execute placement modifiers in order 2026-08-11 09:55:50 +03:00
674d0192c9 Match vanilla placement height sampling 2026-08-11 09:42:11 +03:00
e9fe526300 Pin feature ordering to vanilla runtime 2026-08-11 09:29:17 +03:00
a73b689449 Use world coordinates for ore placement 2026-08-11 01:15:34 +03:00
a23650fc0b Match vanilla ore ellipsoid geometry 2026-08-11 00:56:53 +03:00
b11e6f14cb Pin biome fitness against vanilla runtime 2026-08-10 23:59:22 +03:00
be8f030698 Commit exhaustive vanilla worldgen fixture 2026-08-10 23:54:04 +03:00
064f0f1cca Drive basic trees from biome feature stages 2026-08-10 23:36:12 +03:00
2bfa3155f3 Place biome-driven water and lava springs 2026-08-10 23:29:20 +03:00
dd2ea56850 Load vanilla feature stages and place ores 2026-08-10 23:20:43 +03:00
28c11e2fc2 Bound connection outbound queues 2026-08-10 23:00:20 +03:00
ca019756ec Add vanilla parity harness and harden server boundaries 2026-08-10 22:54:16 +03:00