Commit Graph

1488 Commits

Author SHA1 Message Date
Ludovic Marie fc468a021d Resolve item models exactly as the vanilla client does
The item model harness ran out of memory, so it now streams both outputs and
looks Horizon's rows up by offset. With the vanilla side no longer crashing on
swap-animation lookups (properties now come from the baked set), on armour
(trim sprites are generated by the items atlas's paletted_permutations source
once SpriteSources is bootstrapped) or on compasses (item tags are bound from
the data pack), 197,000 more stacks were compared and 121,841 differed.

Horizon now composes transformations as JOML 1.10.9 does: rotationXYZ and
axis-angle quaternions with cosFromSin, and Matrix4f operations that take the
identity, translation, affine or generic path by matrix properties, with
unfused a * b + c. Float RGB tint constants are scaled by 255, the shulker box
renderer always encodes its texture, and a new palette module ports
PalettedPermutations and PaletteMapping so trim sprites exist on the Horizon
side too.

196,290 resolved stacks match; 2,582 cases are still rejected by vanilla's
stand-in client and not compared.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 21:21:50 +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 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 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 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 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 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 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 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 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 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 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
Ludovic Marie 3318a04819 Add the crafter to the menu engine and click harness
The crafter menu follows CrafterMenu: slots refuse items while their disabled flag is set, and the result slot is non-interactive. Random disabled flags are part of the harness cases.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:30:07 +02:00
Ludovic Marie 5041496f08 Add the brewing stand to the menu engine and click harness
The brewing stand menu follows BrewingStandMenu: single-item potion slots, the ingredient and fuel slots with their quick move rules, checked against vanilla with potion bottles, ingredients and fuels in the random contents.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:29:00 +02:00
Ludovic Marie afb92f7c84 Fix the chunk oracle's enabled features so jigsaw final states parse
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:25:59 +02:00
Ludovic Marie 7f23d4549b Merge main into interaction and inventory work
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:15:07 +02:00
Ludovic Marie 7bd28cc6f1 Port the cauldron item interactions and test them against vanilla
Using a bucket, bottle, water potion, dyed armour, patterned banner or dyed shulker box on an empty, water, lava or powder snow cauldron follows CauldronInteractions, including the creative-mode stack rules of ItemUtils.createFilledResult and the underwater refusal for lava and powder snow. A harness runs every item against every cauldron state in vanilla's own useItemOn and compares the result, block writes, sounds, drops and inventory.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:13:50 +02:00
Ludovic Marie 988ebbf54c Merge branch 'main' into worktree-agent-afae8fa7e3c2bed72 2026-10-10 07:09:59 +02:00
Ludovic Marie 353d849126 Match vanilla weather colours and dimension sky defaults
The environment differential harness now passes for every dimension, biome, time and weather level. Weather colour multipliers are floored to 8-bit channels as vanilla does. A biome without its own fog or sky colour falls back to its dimension's, which fixes the End's dark purple fog, and the missing cloud colour is transparent.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:09:59 +02:00
Ludovic Marie d900b2a8e6 Read the axe, hoe and shovel block transformers from the data pack
A new block transformer module evaluates the data pack's rule based state providers the way BlockTransformer.transformBlock does (matching blocks and tags, all-of, copy properties) and derives the waxed twin of a copper block from the wax-off transforms. A harness compares every transformer, block state, face and block above with vanilla's own providers and with HoneycombItem.getWaxed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:08:27 +02:00
Ludovic Marie 89630c80fe Port AbstractContainerMenu clicks and test them against vanilla menus
A pure menu engine now implements every click type (pickup, quick move, swap, clone, throw, the three quick craft drags, pickup all) for the player inventory, crafting table, chests, hopper, dispenser, shulker box and the furnaces, with armour, fuel, output and crafting result slot rules, the crafting result recompute and remainders, and Inventory.add. The new menu click harness runs thousands of randomized click sequences through vanilla's real menu classes and this engine and compares every slot, the carried stack, data slots and drops.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:01:09 +02:00
Ludovic Marie 50084d03d4 Ignore sections above the noise height and NBT integer widths in the chunk harness
The Nether roof and End sky sections are all air in vanilla and Horizon keeps none, and structure templates keep their stored integer width while vanilla re-saves block entities with its own, so neither is a generation difference.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:00:31 +02:00
Ludovic Marie 3ce74d1351 Merge main into the game loop and input work
Brings the options, timer and mouse parity port on top of everything that landed on main (raids, scoreboards, warden, subtitles and more), keeping both sides in game.rs, clock.rs and settings.rs. The subtitle option test now expects vanilla's behaviour of keeping the default when notificationDisplayTime is out of range.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 06:58:30 +02:00
Ludovic Marie ad4ae23b94 Merge branch 'main' into worktree-agent-aa7f8206a004fc51a 2026-10-10 06:40:42 +02:00
Ludovic Marie a7e63b5c18 WIP: environment render parity harness
Work in progress on the environment rendering differential harness: a Rust fixture example, a vanilla oracle and the driver script.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 06:02:13 +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 7fa9a83542 Add typed block entity NBT and save roundtrip harness (WIP)
Work in progress on typed block entity load/save and the save differential harness.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 03:50:14 +02:00
Ludovic Marie c9ad9869d9 Start the menu click oracle and tweak the interaction lab
Work in progress on the vanilla menu oracle adapter used by the upcoming menu click parity harness.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 03:49:56 +02:00
Ludovic Marie 62fe8a4465 Add item model definitions, baking and parity harness (WIP)
Work in progress on vanilla's item model pipeline in horizon-assets: definition parsing, resolution, generated model baking, special renderers and a differential harness against a Java oracle.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 03:49:13 +02:00
Ludovic Marie a0e9605390 WIP: paletted containers and mesher changes
Work in progress before merging main.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 03:48:16 +02:00
Ludovic Marie e0541ece83 Verify entity model animation against vanilla and fix what differed
A new Java oracle bakes every vanilla model layer, builds the model's own render state and runs the real setupAnim; tools/test_entity_model_parity.py replays the same states through Horizon's animation code and compares every part pose, visibility and the baked polygon sums (about 3700 cases over 125 layers). Fixes the harness found: model sine and cosine now use vanilla's quantised table, the creeper's swapped leg bindings, humanoid arm poses in vanilla order (held items no longer tilt mob arms, bows pose both arms last, crossbow charge, riding, crouching), swing weapon down, piglin ears and dancing, illager hats, arms and bow pose, zombified piglin ears, baby donkey head and legs, hoglin baby head, ravager neck, vex charging arms, feline sitting and lying poses including babies, camel and zombie/skeleton horse baby models, and new ports of the goat, polar bear, panda, llama, turtle, strider, snow golem, silverfish, endermite, parrot, bee, bat, armadillo, axolotl, frog, rabbit and fox models. Hidden parts are now an explicit flag instead of a zero scale, and skipDraw is supported.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 03:44:46 +02:00
Ludovic Marie 6bde74957a Add the command parse differential harness
A Java oracle builds vanilla's real Brigadier command tree with the loaded registries and data-pack tags, exports the tree, and parses a corpus of command strings. The corpus is generated by walking that tree with valid and invalid samples for every argument type plus hand-written edge cases. A Rust example parses the same corpus with Horizon's dispatcher and the Python driver compares success, exact error text and cursor, and end-of-input completion suggestions, with tree-diff and mismatch summary helpers. Currently 79 percent of 39685 inputs match at permission level 4. Entity selector errors now rewind to the start of the input like vanilla.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 03:43:22 +02:00
Ludovic Marie 7cfb90538e WIP: options, timer, mouse (to be squashed) 2026-10-09 14:06:43 +02:00
Ludovic Marie 69c7fd925e Port every crafting recipe type and test recipes against vanilla
The crafting module now matches shapeless recipes with a full bipartite assignment, shrinks shaped patterns like ShapedRecipePattern, keeps result components (suspicious stew effects), and implements the transmute, dye, imbue (tipped arrow), book cloning, firework rocket/star/fade, decorated pot, repair item, map extending, banner duplicate and shield decoration recipes with vanilla's matching and assembly. Crafting remainders now follow Item.craftRemainder only and are placed on the grid by recipe, so cloned books and duplicated banners stay. Stacks gain dyed colour, firework explosion, pot decorations, bundle contents, stew effects and map post-processing components, and their NBT now matches the codecs (defaults omitted, templates without count 1). A banner whose first layer was a rhombus was mistaken for the raid banner; that is fixed.

tools/test_recipe_parity.py drives vanilla's RecipeManager (new VanillaRecipeOracle) and the Rust recipe_fixture over 50k generated crafting, cooking, stonecutting and smithing cases and compares matches, results and remainders as canonical NBT; all match.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 14:04:56 +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