Commit Graph

662 Commits

Author SHA1 Message Date
Ludovic Marie ad4d836f6f Resolve sound events exactly as vanilla SoundManager does
Add SoundRegistry (sounds.json with replace, subtitles, file validation and
event references weighing as much as their event) and a SoundEngine model,
with a differential harness resolving every sounds.json event against the
real SoundManager.prepare and SimpleSoundInstance.getOrResolve.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 21:16:28 +02:00
Ludovic Marie 1e03d531eb Parse every command exactly as vanilla's Brigadier tree does
Ports vanilla's packrat parser with SNBT and component-predicate grammars, the
entity selector, block state and item parsers, resource-or-inline codec
arguments, and the remaining argument types, suggestion providers and error
cursors. The tree gains compute, data modify compute, place, locate poi,
datapack create, item modifiers and the parse-only commands (dialog, kick,
posteffect, fetchprofile, spectate, publish, waypoint, debug, jfr), with
release-dispatcher permissions. /particle takes the 26.3 option syntax.

The oracle's stand-in server now holds a fresh world's real state (data pack
managers, pack repository, empty storages, clocks, templates, an overworld),
so vanilla answers every input instead of crashing on about 1,100 per level.
The command parse harness matches on 39,685 of 39,685 commands at permission
levels 4, 2 and 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 20:56:06 +02:00
Ludovic Marie 6897e4155b Add the nautilus, zombie nautilus, sulfur cube and camel husk
Ports AbstractNautilus, Nautilus, ZombieNautilus and their brains (taming
with pufferfish, saddles and nautilus armour, riding with a dash, breeding,
spawning below sea level, drowned riders), SulfurCube on the slime code
(swallowed blocks and their archetypes, shears, TNT cubes, splitting) and
CamelHusk on the camel (its own saddle and sounds, husk jockeys). Camels now
save their saddle and stay tame after loading, and horse armour layers load.

The entity model harness compares 150 layers, all matching, including the new
mobs and previously unmapped armour, harness, fish and villager layers; mob
attributes pass with the new types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 20:55:17 +02:00
Ludovic Marie f58413cbbf Random-tick only sections holding randomly ticking states
The client random-ticked every section with a non-air block, drawing
getBlockRandomPos positions vanilla never draws. It now ticks a section only
when its palette holds a randomly ticking state, as
LevelChunkSection.isRandomlyTicking does (lava counts through LiquidBlock).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 20:02:40 +02:00
Ludovic Marie 58fe23d330 Match vanilla entity model poses on every compared layer
The warden's walk, idle wobble and pulsating spots now use Mth's sine table
as WardenModel and WardenRenderer do, and baby sniffers no longer apply
SnifferAnimation.BABY_TRANSFORM: SnifferRenderer wraps the baby geometry in a
plain SnifferModel, so that animation never runs in 26.3. The harness now
drives the illusioner through explicit arm poses like the other illagers, and
the oracle shows its hat as IllusionerRenderer does. All 132 compared layers
match over 3,876 cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 19:58:56 +02:00
Ludovic Marie ee8e74b0d2 Chain neighbour updates as far as a server level does in the oracle
The block oracle cut chained neighbour updates at 512, but a server level
uses max-chained-neighbor-updates (1,000,000 by default), as Horizon does, so
long redstone wire cascades stopped early on the vanilla side only. Redstone
now matches on 4,000 of 4,000 cases; block updates and random ticks still
match on every compared case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 19:39: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 1344df60f0 Give the menu oracle's player an advancement tracker
Taking a brewed potion fires BrewedPotionTrigger, which crashed the
stand-in player without PlayerAdvancements. With an empty tracker the menu
click harness matches on 6,000 of 6,000 cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 18:34:26 +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 76030a65cf Re-audit the Java parity table
The overnight work landed LAN hosting, the remaining mobs, client paletted
storage and 18 new differential harnesses, so the table was scored again from a
full run of all 232 harnesses: 223 pass, 8 fail and the item model harness runs
out of memory. Chunk storage, section meshing and lighting now match vanilla in
their harnesses and score 1, and multiplayer rises to 0.75 now that worlds open
to LAN. The other subsystems stay at 0.75 because a harness covering them still
fails or part of them is not yet compared with vanilla; their gaps and the next
steps now name what is left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 13:03:53 +02:00
Ludovic Marie 60cf7b5252 Merge branch 'main' into night-entities 2026-10-10 10:26:59 +02:00
Ludovic Marie f419c33533 Add mob attribute and dimension parity harness
Adds a differential harness that instantiates every vanilla entity type on a detached server level and compares default attributes, standing dimensions and baby dimensions with Horizon's mob table. Baby donkeys and mules now use the vanilla half-size hitbox instead of 0.7 scale.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 10:26:59 +02:00
Ludovic Marie d5ce2b5201 Merge worktree-agent-abc3c79c07e209fba 2026-10-10 10:08:36 +02:00
Ludovic Marie e53da6f281 Merge worktree-agent-a45c92d353e101334 2026-10-10 10:08:35 +02:00
Ludovic Marie 0548179661 Merge worktree-agent-a3f604d3c8055fe6e 2026-10-10 10:08:35 +02:00
Ludovic Marie aabc88d433 Merge main into agent branch
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 09:57:55 +02:00
Ludovic Marie 88980141c2 Merge branch 'main' into worktree-agent-a45c92d353e101334 2026-10-10 09:57:38 +02:00
Ludovic Marie a08f6c7c7a Fix clippy lint in item modifier sequence
The sequence loot function folds over an Option accumulator, which clippy flags as a manual try_fold. The fold is intentional, so allow the lint there.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 09:57:38 +02:00
Ludovic Marie 8e4e31e823 Merge worktree-agent-afae8fa7e3c2bed72 2026-10-10 09:55:55 +02:00
Ludovic Marie 742a3dbfca Merge main into the X work
Merges local main into this branch. The only conflict was in the illager
animation: this branch's anim_pose (with the passenger sitting pose) is kept,
and main's change that leaves the illusioner's hat visible is applied to it.
fmt, clippy with -D warnings and the full workspace tests pass.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 09:54:41 +02:00
Ludovic Marie 03e7c7fd64 Merge main into the save roundtrip work
Brings main's sync_level()/save_game() split and the world ticks inside
`if running {}` into the typed block entity NBT, save roundtrip harness and
session.lock work. The only textual conflict was in recipe_book.rs, where
the player file writer keeps main's toBeDisplayed list alongside the
recipes list. fmt, clippy -D warnings and the whole workspace test suite
pass.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 09:52:51 +02:00
Ludovic Marie 2758614c49 Merge worktree-agent-aadb889c2eebe6c5b 2026-10-10 09:31:28 +02:00
Ludovic Marie d511cffa11 Satisfy clippy in the long set size check
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 09:31:13 +02:00
Ludovic Marie 26a369b76d Document the whole-chunk differential harness and its results
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 09:18:54 +02:00
Ludovic Marie 5dbf3b62a8 Fix integration of the overnight branches
After merging the overnight feature branches, the only remaining problem was a clippy lint in the illusioner mob code, where a manual modulo check had to become is_multiple_of. With that change, formatting, clippy with warnings denied and the full workspace test suite all pass.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 09:15:53 +02:00
Ludovic Marie bd9b873fcd Add random tick and redstone harnesses, wire detector rails and plates
Adds differential harnesses for random/scheduled ticks and redstone circuits on top of the block update oracle, and makes the oracle report pending block events as the deduplicated set vanilla keeps. The harness found that detector rails never sensed anything, so they now check for minecarts on place, tick and entity contact, and the client reports the player and minecarts to pressure plates, tripwires and detector rails each tick.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 09:12:17 +02:00
Ludovic Marie c8567f4049 Merge main into the item model and mob work
Finishes the in-progress merge of main into this worktree's branch, keeping both sides: main's sync_level()/save_game() split and the world ticks inside the running block alongside this branch's item model baking, new mob brains and command parsing work. cargo fmt, clippy with warnings denied and the full workspace tests all pass.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 09:08:45 +02:00
Ludovic Marie eba56af3d6 Merge worktree-agent-ad30db2169aa3bd5b 2026-10-10 09:05:49 +02:00
Ludovic Marie f0d33d3cf8 WIP: command and datapack tweaks
Work in progress on commands, functions and scoreboard handling carried over from the interrupted run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 08:59:08 +02:00
Ludovic Marie 528cb26f33 Add illusioners
The illusioner is an illager spellcaster with a bow. It casts a mirror spell that makes it invisible for a minute while four mirror images wobble around it and reshuffle when it is hurt, and, on Hard-ish local difficulty, a blindness spell on a new target. It shoots arrows like a skeleton, flees from creakings, joins raids and illager target rules, scares villagers and traders, and shows its hat and bow arm pose as in vanilla. Other illagers no longer draw the hidden hat layer.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 08:51:41 +02:00
Ludovic Marie d32c0bf209 Merge worktree-agent-aa7e89ef91d408a4e 2026-10-10 08:46:27 +02:00
Ludovic Marie f5a4a4931e Merge worktree-agent-a12e061d400abc3f6 2026-10-10 08:46:23 +02:00
Ludovic Marie adb7db1893 Merge worktree-agent-a3d290373639c1580 2026-10-10 08:46:19 +02:00
Ludovic Marie 9489ce1cd8 Merge worktree-agent-aa7f8206a004fc51a 2026-10-10 08:46:17 +02:00
Ludovic Marie f9cf32650b Merge branch 'main' into worktree-agent-aadb889c2eebe6c5b 2026-10-10 08:46:16 +02:00
Ludovic Marie 34117b70ee Make the chunk oracle report no light during features, like an unlit generation chunk
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 08:21:28 +02:00
Ludovic Marie 4dbab3ba99 Merge branch 'main' into worktree-agent-a3f604d3c8055fe6e 2026-10-10 08:15:00 +02:00
Ludovic Marie 935e2712be Merge main into the game loop and input work
Merge local main into the options, timer and mouse branch. The only conflict was the module list in horizon-client's lib.rs, where this branch adds keymapping and main adds lan; both modules are kept. main's sync_level()/save_game() split and the world ticks inside `if running {}` merged cleanly. cargo fmt, clippy with -D warnings and the whole workspace test suite pass.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 08:12:32 +02:00
Ludovic Marie 9c20cc7bb2 Fill dungeon chests and spawners and keep block entities across same-block updates
A monster room's chest took its loot table and seed from the level random in vanilla, and its spawner got the chosen mob's spawn data, but the worldgen world ignored both, so the random sequence and the block entities diverged. A block entity also now survives a set of the same kind of block (a waterlogging chest in a ruined portal), as in a vanilla proto chunk. The chunk harness stops reporting default block entities and vault reward tables as differences.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 08:09:01 +02:00
Ludovic Marie 1ec6f0f928 Match vanilla save omissions and refuse old DataVersions
The vanilla differential run showed Horizon writing fields vanilla leaves out: empty scoreboard parts, recipe book settings at their default, an empty warden anger list. These are now omitted, and mobs loaded without saved equipment no longer receive the default bow. Opening a world whose level.dat is older than 26.3 now fails with a message naming tools/upgrade_world.py, which runs vanilla's own forceUpgrade on a copy. The roundtrip harness lists the timing-dependent differences it tolerates, and horizon-ctl waits up to five minutes for the control socket on a loaded machine.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 08:05:35 +02:00
Ludovic Marie cedae6609d Route inventory clicks, drags, double clicks, hotkeys and drops through the menu engine
On the player inventory, crafting table, chest family, hopper, dispenser and furnace screens, holding a stack and dragging across slots now splits it (left even, right one each), a quick second click gathers matching stacks, number keys and F swap with the hotbar or off hand, and Q or Ctrl+Q throws one or the whole stack, all through the same engine the click harness checks against vanilla. Other screens keep their own click handling.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 08:02:24 +02:00
Ludovic Marie d4410c3500 Merge branch 'main' into worktree-agent-aa7e89ef91d408a4e 2026-10-10 07:33:35 +02:00
Ludovic Marie 0e0e94111f Add LAN discovery listing
The multiplayer screen listens on the vanilla multicast group 224.0.2.60:4445 and lists LAN worlds announced with the [MOTD]/[AD] format, letting the player join them directly.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:33:35 +02:00
Ludovic Marie 145d54c542 Use Section::unpack and per-section biomes in the LAN chunk encoder
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:33:13 +02:00
Ludovic Marie bf9161cb29 Give the chunk oracle full feature flags, a difficulty and an entity id source
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:33:13 +02:00
Ludovic Marie 762ad298e6 Finish the pending menu and storage work
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:33:13 +02:00
Ludovic Marie 40802dd9af Merge worktree-agent-abc3c79c07e209fba 2026-10-10 07:33:10 +02:00
Ludovic Marie 2e96a8372e Merge worktree-agent-a45c92d353e101334 2026-10-10 07:33:10 +02:00
Ludovic Marie e71f091362 Merge worktree-agent-a1352eba6412466b8 2026-10-10 07:33:10 +02:00