Commit Graph

216 Commits

Author SHA1 Message Date
Ludovic Marie 58e184f5d5 Structure blocks harness: place the oracle's own pieces, split piece boxes from their surroundings
The mod world now takes each saved start whose pieces are all jigsaw pieces
as the oracle saved it (chunk_dump's HORIZON_SAVED_STARTS, through a new
GeneratorWorker::use_saved_start and PoolPiece::from_saved), so the blocks
are checked whatever the layout: Lithostitched lays jigsaws out its own way
(spec-lithostitched OPEN-L5) and the layout harness checks layouts apart.
Lithostitched's wrapper elements place their delegate; 1.21.1 block states
are read in 26.3's shape.

Counts are split between positions inside a piece's box and around them
(terrain adaptation, decoration), and every mismatch class is written to
.local/structure-layout/<profile>/blocks-report.json.

A CTOV profile carries Lithostitched and ChoiceTheorem's Overhauled Village
from a pack's jar folder (.local/structure-oracle/pack-jars).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 08:51:17 +01:00
Ludovic Marie 8948bf90c4 Structure layout harness: Horizon's starts piece by piece against the structure oracle
The clean-room structure oracle saved, for 31 starts of vanilla structures
(villages, outposts, trial chambers, shipwrecks, ruined portals, desert
pyramids over seeds 1234, 2 and 42), the no-mod world's pieces. A new
structure_pieces probe lists the starts a chunk owns, piece by piece, and
tools/test_structure_layout_parity.py compares them with those saves.

22 of the 31 match piece for piece (every village and outpost that 26.3
still places there, and the horizontal boxes of the code-built pieces).
The other 9 differ between 1.21.1 and 26.3 themselves: 26.3 vanilla's own
pieces there (VanillaChunkGenerationOracle scan) equal Horizon's for all 18
starts that differ from 1.21.1. No vanilla jigsaw fix is needed.

Templates now keep the id they were loaded under, so a piece names its
element.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 03:57:01 +01:00
Ludovic Marie 0b581f9ffe Give each crate's probe example its own target name
horizon-client, horizon-world and horizon-protocol each had an example
named `probe`. Cargo copies every crate's examples into one
<profile>/examples/ directory, so parallel parity harnesses sharing a
target dir could run another crate's probe (CI parity run 40055656303:
command_parse ran the horizon-world dispatcher). The examples are now
client_probe, world_probe and protocol_probe ([[example]] in each
Cargo.toml; the files stay where they are), and every harness builds
and runs its own crate's name.

tools/parity.py recognises the new names when it counts the probes a
harness ran, and renames the old `probe` in recorded artifacts to the
crate's target (from the record's -p, else its probe sources), so the
prebuild still builds them instead of dropping them as unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 08:08:18 +02:00
Ludovic Marie ed847d43dc Keep the probe list out of the harnesses' dependencies
main.rs now only lists the probes; dispatch.rs runs them. The runner leaves
main.rs out of a probe-binary harness's dependencies and keeps dispatch.rs,
so adding a probe no longer reruns (or flake-checks) every harness of its
crate. It also follows crate::<probe> references between probes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:30:38 +02:00
Ludovic Marie ab4c246cda Delete the 11 examples nothing references
Eight benches (block_facts, chunk, entity_geometry, json_readers, load,
save, streaming, tick_chunk_membership), lan_flat, save_parity and
vanilla_diff: no harness, tool, doc or workflow names them (review plan,
section 1, dead code). -2,222 lines; Git history keeps them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:30:38 +02:00
Ludovic Marie 7092f16a06 horizon-world probes: one copy of the helpers they shared
Now that the probes are modules of one binary, the helpers copied between
them live once in examples/probe/support: the collision probes' shape
printer (emit, values, box_values, bounds, 8 copies each), the canonical
NaN bits of f64 and f32 (50 copies), the registry JSON-to-NBT reader (15)
and the JSON block position (4). -1,097 lines of copies.

f64::NAN.to_bits() is 0x7ff8000000000000, the literal some copies used,
so every probe prints the same bytes.

tools/parity.py follows include!: three probes include another probe's
source, and stay dependent on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:30:38 +02:00
Ludovic Marie fdae4b895c horizon-world probes: one binary, probe <name>
The 168 horizon-world examples the parity harnesses run become modules of
one example, examples/probe, that dispatches on its first argument;
crate::args() gives each the command line its example saw. Linking ~170
binaries, each instantiating horizon-world's generics again, was most of
the parity job's probe build (review plan, section 1).

The harnesses build `--example probe` and run `probe <name> ...`.
tools/parity.py counts only the probes a harness ran, and the support
modules they name, as its dependencies, so editing one probe still reruns
only its own harnesses (and PARITY_RUST_SCOPE keeps working).

The six manual tools (benches, loot_fill, structure_blocks, vanilla_diff,
attribute_memory, behaviour_load_profile) stay separate examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:30:38 +02:00
Ludovic Marie feeefb3a33 Mobs: a punch shows smooth and slow, as on vanilla's client
The server sends a knocked-back, pushed or jumping mob's move at once
(Entity.needsSync), and the remote client walks every living entity along
the server's positions with vanilla's SteppedInterpolationHandler: each
position takes the type's update interval to reach, sped up while steps
pile up. Before, the client waited for the next due update and then
lerped there in fewer ticks, so a hit pig jumped away fast.

tools/test_stepped_interpolation_parity.py drives vanilla's unmodified
InterpolationData and the Rust port with the same packets and ticks
(random cases and a punched pig's knockback); 135236 positions and
rotations match bit for bit.

Fixes #1374

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 05:38:46 +02:00
Ludovic Marie a9682c5554 Merge pull request #1264 from rdbtCVS/perf/end-identity-surface
🤖 Agent: merged after verify passed and the wave 2 integration run on the desktop (main + 16 contributor PRs, tree 71afc562: workspace tests 1887/0, launcher 113, naga translations 0 failures, parity --changed 304/0).
2026-10-22 22:02:53 +02:00
Ludovic Marie dcb3749ed1 Merge pull request #1248 from rdbtCVS/t3/fix-block-place-animation
🤖 Agent: merged after verify passed and the wave 2 integration run on the desktop (main + 16 contributor PRs, tree 71afc562: workspace tests 1887/0, launcher 113, naga translations 0 failures, parity --changed 304/0).
2026-10-22 21:57:58 +02:00
rdbtCVS 0928c83d4c Skip provably unchanged native End surface traversal 2026-10-22 18:40:01 +01:00
rdbtCVS ecbb0368c5 Fix hand swing prediction for rejected block placements 2026-10-22 17:37:42 +01:00
rdbtCVS a648622b92 bench: report exact warmed generation wall timings 2026-10-22 15:46:40 +01:00
Ludovic Marie e725e5257f Chunk generation harness: compare postprocessing marks too
The oracle prints every ProtoChunk postprocessing position and chunk_dump
prints Horizon's, so a chunk that schedules different fluid or shape
updates after generation (the blocks that later tick and drop items in
fresh chunks, #996) fails the harness.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 19:39:37 +02:00
Ludovic Marie 2e98f6a18a Let the behaviour profiler use a snapshot folder
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 04:25:02 +02:00
rdbtCVS 78791b79ce Cache resolved block behaviours across launches 2026-10-17 01:03:21 +01:00
Ludovic Marie 55945ee975 Collision scans: skip blocks with no shape, build the entity shape lazily
BlockCollisionScan asked every cursor cell for its collision shape,
moved it into place and intersected it with Shapes.create(box), even
for air. Mob movement and every other Entity.collide spent most of
their time there. Now:

- CollisionBlock carries empty_shape, set by the registry for states
  with no contextual rule and an empty cached shape (air, plants): the
  scan skips them without asking. Providers that build CollisionBlock
  themselves (the query-order fixture) leave it false, so their query
  logs are unchanged.
- A shape whose bounds miss the box is skipped before moving it:
  joinIsNotEmpty(AND) of the two is false anyway.
- Shapes.create(box) is built the first time a shape is not the unit
  cube (finite bounds always make one), not for every scan.
- SceneCollisions hands the scan the resident chunk itself, so a cell
  costs one section read instead of a chunk-map lookup.

Results are unchanged: running both paths side by side over 900,000
mob moves in a 600-mob village gave bit-identical movement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:40:22 +02:00
Ludovic Marie d9deabd54e Command blocks: placing, the edit screen, and running commands
A creative player with game master commands (Player.canUseGameMasterBlocks)
places command, chain and repeating command blocks and opens
CommandBlockEditScreen on them: the command, its previous output with the
O/X tracking toggle, Impulse/Chain/Repeat, Conditional and Needs
Redstone/Always Active, applied as handleSetCommandBlock does.

The block entity (CommandBlockEntity with BaseCommandBlock) saves and
loads its vanilla fields. CommandBlock.tick runs impulse blocks on a
rising signal, repeating blocks every tick while powered or always
active, and the chain in front (executeChain), honouring conditional
blocks, command_blocks_work and max_command_sequence_length. Commands
run through the command system as the block (position, facing, game
master level); their feedback becomes the block's last output and the
[@: ...] broadcast under command_block_output. Comparators read the
success count.

Fixes #444

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 07:07:47 +02:00
Ludovic Marie 1f06156649 Nether portals: vanilla timing, linking, and items and mobs travel
The player's portal timer reset to zero on any tick outside a portal and
came back from a trip with a 300-tick cooldown that only ran down outside
portals; the overworld exit search covered 32 blocks of loaded chunks;
nothing but the player could use a portal.

The player now follows Entity.setAsInsidePortal / handlePortal with
PortalProcessor (decay by 4, the cooldown of 10 that a portal keeps
resetting, players_nether_portal_default/creative_delay), and
NetherPortalBlock.getPortalDestination through the new
horizon_world::level::portal_travel: PortalForcer.findClosestPortalPosition
(16 / 128 blocks, loaded and saved chunks), createPortal,
BlockUtil.getLargestRectangleAround, PortalShape.getRelativePosition and
findCollisionFreePosition, with the turned yaw and motion and
block.portal.travel. LocalPlayer.handlePortalTransitionEffect closes
screens and plays block.portal.trigger. Items and mobs go through after one
tick with a 300-tick cooldown and wait as saved entities until their
dimension loads around the exit.

tools/test_nether_portal_parity.py compares the destination with vanilla's
getPortalDestination over two headless levels; the scene motion harness
gains portal fixtures for the player's processor and cooldown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:06:24 +02:00
Ludovic Marie 7ace13cc82 Find a new world's spawn as vanilla does
Horizon searched its own spiral of 48-block steps from 0 0 for a dry,
non-leaf top block, so seed 1891623539983467248 spawned at -48 -48 where
vanilla puts the world spawn at 144 71 144 (the player then lands within
the respawn radius, 152 145 in the report).

Vanilla (MinecraftServer.setInitialSpawn): NoiseBasedChunkGenerator.
getOrigin runs NoiseSpawnFinder over the noise settings' spawn_target
points (SpawnTargetPoint.sampleFitness, a 2048/512 then 512/32 radial
search biased towards 0 0); an 11 by 11 chunk spiral around that chunk
takes the first column PlayerSpawnFinder.getSpawnPosInChunk accepts
(getLevelRespawnPos: MOTION_BLOCKING, WORLD_SURFACE and OCEAN_FLOOR
heights, no liquid, a full-topped collision shape); without one, the
origin chunk's centre at the spawn height. The first player is then
placed by PlayerSpawnFinder.findSpawn: the respawn-radius square in a
random coprime order, a free player box with liquids colliding, else the
spawn with fixupSpawnHeight; adventure mode uses the spawn as is.

horizon-world gains worldgen::spawn_finder and OverworldGenerator::origin;
the client's world_spawn module and game/initial_spawn.rs follow
setInitialSpawn and PlayerSpawnFinder, for single player and the
dedicated server alike. Flat worlds use FlatLevelSource's origin and
spawn height.

tools/test_world_spawn_parity.py compares, for the report's seed, the
chunk harness's seeds and 50 random ones, the origins
(VanillaWorldSpawnOracle against the spawn_origin example) and the
level.dat spawn of worlds created by the vanilla dedicated server and by
Horizon's. Vanilla is not deterministic on chunk corners where trees of
neighbouring chunks overlap (decoration order follows its worker
threads), so a mismatching seed reruns vanilla up to three times.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:49:15 +02:00
Ludovic Marie 2c57fcc09f decorated_region: compare fully decorated regions decorated in vanilla's order
A new harness decorates a 13x13-chunk area around each site, on both sides,
in the order vanilla's chunk scheduler uses around a player standing there
(chunk_dump HORIZON_LIST_ORDER prints decoration_order::vanilla_order), and
compares every block state, quart biome, block entity and scheduled tick:
the two reported spots on seed 1891623539983467248 (taiga trees at
204 -239; a stronghold with sculk and a geode at 4870 401), eleven tree-heavy
biomes and the nearest mineshaft, village, ancient city and trial chambers of
two seeds. 21 sites, 3,549 chunks, 0 differences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 00:09:59 +02:00
Ludovic Marie 2c8de2b015 chunk_generation: compare scheduled ticks; HORIZON_ORDER decoration order
Both dumps list each proto chunk's scheduled block and fluid ticks in
scheduling order (`t block|fluid NAME X Y Z PRIORITY`) and the harness
compares them: they run once the chunk is live, and the leaf ticks of
updateShapeAtEdge were missing without any block differing at FEATURES.

HORIZON_ORDER names a file of `x z` lines both sides decorate in, instead of
row-major: decoration is order dependent (a chunk's features write into its
neighbours), and vanilla's chunk system decorates around a player in its own
order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 23:38:02 +02:00
Ludovic Marie d229326779 Datafix harness: --band TARGET checks the fixes up to a DataVersion on legacy-layout worlds; fixes sorted by key 2026-10-13 00:06:19 +02:00
Ludovic Marie ca1bc52a49 Stop the jukebox's song and the beacon as their block entities go
LevelChunk.removeBlockEntity calls setRemoved: a jukebox reports its song
stopping (the jukebox_stop_play game event and level event 1011) and a
beacon plays its deactivation, whatever the flags. A record popped from a
replaced jukebox stops a playing song first and updates the neighbours as
JukeboxBlockEntity.onSongChanged does (a redstone wire beside it can pop).
The block update oracle removes block entities the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:44:54 +02:00
Ludovic Marie e664d2f7c4 Merge origin/t3/achieve-full-parity into parity/block-followups
Explosion drops keep their random sequences and the pot's dynamic drops;
/setblock destroy and /fill destroy run Level.destroyBlock through the
behaviour library, so the block entity spills as vanilla's does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:19:39 +02:00
Ludovic Marie 4490ff75fc Spill block entity contents when their block is replaced, as vanilla does
LevelChunk.setBlockState now runs BlockEntity.preRemoveSideEffects and
removes the block entity when a block with one is replaced by another
block (copper chests and copper golem statues keep theirs across
weathering; UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS skips the side effects).
Containers spill every slot through Containers.dropItemStack (spot and
pieces of 10 to 30 with triangular motions from the level random, empty
slots still drawing their spot), jukeboxes pop their record, lecterns
their book; shulker boxes keep their contents for the dropped box.
Campfires, decorated pots, chiseled bookshelves and shelves, which Horizon
keeps as loaded, spill too.

Block.dropResources now draws its loot and pop spots when the behaviour
calls it, not after it returns, and spawnAfterBreak awards ore, sculk and
spawner experience. Item entities and orbs the behaviour makes are added
before it returns to the game, in the same tick. Player mining follows
ServerPlayerGameMode.destroyBlock's order (removal and spill, tool wear,
then the drops); explosions let the removal spill the contents.
ExperienceOrb.award draws the merge id from the level random and moves
the orb with its own random. Decorated pots copy their decorations and
drop their sherds when cracked (loot tables' dynamic entries).

The block update oracle replays preRemoveSideEffects too, and the new
block removal harness (tools/test_block_removal_parity.py) compares
setBlock/destroyBlock/removeBlock on every block entity holder with
contents against vanilla: 2000/2000 cases match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:49:20 +02:00
Ludovic Marie cfb19e238f Merge branch 'parity/rendering-anim' into parity-base 2026-10-12 16:43:49 +02:00
Ludovic Marie 6bc85d48c6 Tick chest lids and enchanting books as vanilla and drive the renderer with it
block_entity_anim now also ports ChestLidController (chests, trapped and
copper chests, ender chests: triggerEvent(1, openCount), tickLid,
getOpenness), ChestBlock.opennessCombiner and ChestRenderer's lid curve,
and EnchantingTableBlockEntity.bookAnimationTick with its render state
(nearest non-spectator player by feet position within 3 blocks, Mth.atan2,
the class's shared RANDOM). The renderer pairs a double chest half with its
neighbour only as DoubleBlockCombiner does (same block, other half, same
facing) and reads the book from BlockAnim instead of ticking its own copy.

The game keeps a BlockEntityAnims and runs the client tickers of every
loaded animated block entity each tick: chest lids, books, shulker boxes,
bells (resonance sound, entity-effect particles, raider glow), conduits
(nautilus particles) and dragon/piglin heads. Opening and closing chests,
ender chests and shulker boxes sends the opener-count block event (both
halves of a double chest); a ring's block event reaches the bell through a
new LevelEvent::BlockEntityEvent. The renderer now gets this state instead
of BlockAnim::default(), so shulker lids, bells, conduits and heads move.

block_entity_anim harness: 256/256 cases (new: 48 chest, 36 book).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 13:12:30 +02:00
Ludovic Marie e6e7de7ebe Merge branch 'parity-base' into parity/saves 2026-10-11 14:12:55 +02:00
Ludovic Marie 6734879ff7 Pass rustfmt and clippy after merging the parity branches
Formats the overnight parity work, fixes the lints it introduced, and
updates the LAN bot test and mob AI probe for fields added on the other
side of the merges (the bot test also set a field that never existed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 14:11:51 +02:00
Ludovic Marie 68092c4c7f WIP: unfinished saves parity work, stopped for the night
Uncommitted changes the agent had in progress when it was stopped; may not
build or pass its harnesses yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 22:24:03 +02:00
Ludovic Marie 1d70ca47a8 Generate whole chunks block for block as vanilla does
The chunk generation harness found 70 differing chunks across three seeds in
the overworld, Nether and End. Proto chunks, biomes and decoration now span
the dimension type's build range rather than the noise height, so features
above y=128 in the Nether and End city upper floors survive; the decoration
level reports no sky light, as unlit vanilla chunks do, so mushrooms and crops
pass or fail their light checks the same way; beehive decorators store their
bees; iceberg ellipses skip NaN distances; double slabs never waterlog;
mineshaft spawners save an empty SpawnPotentials list; and the dump example
forgets structure starts between rectangles, as the oracle starts each with
fresh chunks.

The oracle prints absent block entity keys as vanilla loads them from an empty
tag, and the harness treats vanilla's save-format equivalences (plain sign
text, absent empty banner patterns, unfiltered sign messages) as equal. All 2,352
chunks over 225 structure sites match with zero block, biome or block entity
differences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 21:20:51 +02:00
Ludovic Marie 2876752a36 Read an empty lectern's comparator signal in the block fixture
The oracle now gives comparators and lecterns real block entities, so a
lectern whose state has a book reads page progress 1 of an empty book and
signals 14. The fixture's stand-in block entities now do the same, and the
redstone harness matches on 8,000 of 8,000 cases with a second seed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 19:32:30 +02:00
Ludovic Marie 11b8a98ff5 Match vanilla random ticks on every comparable case
The random tick oracle now stands on a real overworld: the data pack's
dimension type (for fire's infiniburn tag), its attributes and day timeline
on a clock at the fixture's day time, level data for difficulty, and block
scans that walk positions in BlockScanUtils' section order, since 26.3 reads
chunk sections the map-backed level does not have.

Horizon now rolls the nether portal's zombified piglin spawn with the level
random (the client spawns it near a player), rechecks chest and ender chest
openers through a new block entity hook and broadcasts the lid event, gives
melting ice and placed sniffer eggs their game events, and reads the weather
age of copper golem statues, which name the field weatheringState. The
fixture prints empty dispensers, crafters, ghastling spawns and fresh
shriekers as vanilla resolves them.

Random ticks match on 39,998 of 39,998 compared cases (two propagules cannot
grow trees in the oracle), block updates on 40,000 of 40,000 and redstone on
3,999 of 4,000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 18:51:18 +02:00
Ludovic Marie cf570c9fba Match vanilla block updates on every harness case
The block update oracle crashed on 625 cases because its constructor-less
level had no sound seed generator, attribute system or chunk source; it now
supplies them, keeps cave and void air apart from air, and creates block
entities on demand as a real level does. With those cases compared, Horizon
now primes TNT with the level random, sound and prime_fuse event at the
moment of priming, links powered wooden shelves into side chains, breaks
nether portals whose frame is no longer complete, reacts to power at command
blocks through a new block entity hook, rings bells with their block event,
uses the straw bed's own destroy particles and gives big dripleaf tilt changes
their vibration. Empty dispensers also emit block_activate in the client.

Block updates match on 40,000 of 40,000 cases and redstone on 3,999 of 4,000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 18:27:39 +02:00
Ludovic Marie f9cf32650b Merge branch 'main' into worktree-agent-aadb889c2eebe6c5b 2026-10-10 08:46:16 +02:00
Ludovic Marie 6405716829 Format block update fixture
Run cargo fmt over the block update fixture after merging main.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:02:16 +02:00
Ludovic Marie aa810a8802 WIP: block update harness fixes
Work in progress on the block update differential harness fixtures and redstone/piston update fixes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 06:37:52 +02:00
Ludovic Marie 3d8bdf6b39 WIP: block update differential harness
Adds the vanilla updateShape/neighborChanged oracle, the Rust fixture example and the Python driver, plus a handle_neighbor_changed entry point on Behaviours.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 03:50:38 +02:00
Ludovic Marie 1d6b7b5a0c WIP: chunk parity structure fixes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 03:47:54 +02:00
Ludovic Marie 90023be7c2 Add a whole-chunk differential harness against vanilla generation
The new oracle drives vanilla's own chunk stages (structure starts and references, biomes, terrain with surface and carvers, then biome decoration with every placed feature and structure piece) through real WorldGenRegion instances, and the chunk_dump example runs the same stages in the same order in Horizon. The Python runner compares every block state, quart biome and block entity over terrain sites and structure sites found by scanning each seed, in the overworld, Nether and End, with phases that stop before features or run structure pieces only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 14:02:16 +02:00
Ludovic Marie 488f8bd030 Make clippy pass with -D warnings
Apply clippy's fixes, fix the remaining lints by hand and allow, for the
whole workspace, the lints that one-to-one ports of vanilla's Java
naturally trip (argument counts, index loops, nested types, large enum
variants).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 00:32:50 +02:00
Ludovic Marie df14adbfba Format the workspace with rustfmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 00:28:32 +02:00
Ludovic Marie 2a7f199b5f Fix the tree feature harness and the scene probes
The tree fixture world now applies vanilla's edge shape updates for its
obstacles (faceless vines, unsupported short grass), the vanilla fixture
world answers environment attributes with defaults, and features that
need structure templates or the pale moss registry, directly or through
named features, are left to the decoration harnesses. The scene probes
build their scene with World::test_scene since TestWorld was removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 00:28:31 +02:00
Ludovic Marie 9edcbc2559 Give parity harness javac runs the oracle source path
Oracles reference shared helper oracles (heightmap, level shape...) that
javac could not find when only the entry files were listed. Also let
chunkgen_bench list unsupported features (HORIZON_LIST_UNSUPPORTED=1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 23:33:12 +02:00
Ludovic Marie b7098f6870 Fix up the merged parity branches so the workspace builds
Resolve the places where union merges kept both sides: the persist
rewrite of level.dat now carries item components, XP seed and effects;
mob ticking uses the creatures module (with Thorns); explosions damage
mobs through the new damage source and emit particles; TNT's white
flash moves to overlay 5 since clouds use 4; End gateway data follows
the new dimensions/ folder layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 23:27:24 +02:00
Ludovic Marie ce1a593957 Merge remote-tracking branch 'origin/wip/parity-structures' into t3/minecraft-parity
# Conflicts:
#	crates/horizon-world/examples/chunkgen_bench.rs
2026-10-08 23:19:58 +02:00
Ludovic Marie ee5e2de7bb WIP snapshot: unfinished structures parity work (paused mid-task, may not build)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 21:40:00 +02:00
Ludovic Marie d3659d9652 Match vanilla structure placement block for block
- Legacy jigsaw elements apply STRUCTURE_AND_AIR last, after jigsaw
  replacement (outposts no longer carve air where jigsaws sat).
- Templates without a known shape run StructureTemplate's neighbor shape
  updates (updateShapeAtEdge, then updateFromNeighbourShapes) through
  level::Behaviours: snowy grass under igloos, stair shapes and fence
  connections in shipwrecks.
- The placement oracle keeps going through structure entities (a level
  stand-in with no enabled features) and compares brushable-block loot.

With block behavior exports present, 18 chunks of seed 1 covering
villages, igloo, outpost, mineshafts, shipwreck, warm ocean ruin, buried
treasure, ruined portal, trial chambers, monument, mansion, stronghold,
ancient city, trail ruins and a jungle temple match vanilla exactly,
blocks and block-entity loot seeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:46:03 +02:00
Ludovic Marie 63c5ba018d Add the End to the client: portals, gateways, exit portal and sky
- Dim::End (DIM1 region folder, End environment attributes, sky light).
- Eyes of ender fill End portal frames; a complete ring of twelve
  (EndPortalFrameBlock portal shape) lights the 3x3 End portal.
- End portals travel to the End (obsidian platform at 100 49 0, facing
  west) and back to the world spawn; dying in the End respawns in the
  Overworld.
- Without the ender dragon the fight counts as won: the active exit
  portal (EndPodiumFeature) and the first gateway of the seed's
  shuffled ring are placed once the main island is loaded.
- End gateways: TheEndGatewayBlockEntity exit search (chunk scan,
  findValidSpawnInChunk, END_ISLAND fallback, findTallestBlock), exit
  gateways linked both ways and kept in DIM1/horizon-end-gateways.json;
  worldgen return gateways lead exactly to the End spawn.
- End sky box (end_sky.png tiled, 0x282828), End portal and gateway
  surfaces and the spike End crystals (EndCrystalModel animation).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:30:47 +02:00