diff --git a/README.md b/README.md index c8ae1d65c..33456b150 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Horizon is a Rust rewrite of Minecraft Java **26.3** targeting one-to-one vanill - shields, maps, books, fireworks, beacons, advancements and statistics; - Anvil saves. -Parity is **not** complete. Still missing: the warden and the sculk family, the breeze, sniffer, creaking, happy ghast, llamas and a few other mobs, raids and pillager patrols, villager breeding and gossip, the loom, crafter and recipe book, scoreboards, subtitles, and spawned mob gear enchantments. Multiplayer joins vanilla servers but Horizon cannot host one. See [Rust rewrite status](docs/rust-parity.md). +Parity is **not** complete. Still missing: the warden and the sculk family, the breeze, sniffer, creaking, happy ghast, llamas and a few other mobs, raids and pillager patrols, villager breeding and gossip, scoreboards, subtitles, and spawned mob gear enchantments. Multiplayer joins vanilla servers but Horizon cannot host one. See [Rust rewrite status](docs/rust-parity.md). ### Java parity: 84% @@ -39,10 +39,10 @@ round-trip harness has not been rerun. | World generation | 1 | None: 2,352 whole chunks over 225 structure sites, in all three dimensions, identical to vanilla | | Region files and saves | 0.75 | Saves round-trip with vanilla, and worlds from 1.18.2 to 26.2 upgrade as vanilla's DataFixers do over 22 sample worlds; worlds older than 1.18.2 are not upgraded | | Entities and physics | 0.75 | Attributes, dimensions, death loot, spawn rules and natural spawning (15,500 NaturalSpawner cases) match; AI not compared; drowned, villagers, traders and the wither unverified | -| Interaction and inventory | 1 | None: menu clicks match over 6,000 click sequences | +| Interaction and inventory | 1 | None: menu clicks match over 8,000 click sequences, the loom and the crafter included; recipe book placement (6,000 cases), its buttons (1,200), the saved book (1,500) and the loom and crafter screens (1,600) match vanilla | | Menus, HUD and chat | 0.75 | Commands parse as vanilla over 39,685 inputs, but /item modify, /spectate, /waypoint and /dialog do not run; no tab list or world border rendering | | Audio | 0.75 | Sound engine, music and ambience not compared with vanilla | -| Block behaviours and ticking | 0.75 | Block updates, random ticks, redstone and dispensers match vanilla; a container replaced by another block keeps its contents instead of spilling them, and there are no copper golems | +| Block behaviours and ticking | 0.75 | Block updates, random ticks, redstone, dispensers and crafters (4,000 crafts) match vanilla; a container replaced by another block keeps its contents instead of spilling them, and there are no copper golems | ### Next steps diff --git a/docs/rust-parity.md b/docs/rust-parity.md index 807b875cb..751ebec41 100644 --- a/docs/rust-parity.md +++ b/docs/rust-parity.md @@ -1288,3 +1288,48 @@ binding. Rendering, transport, full entity lifecycle integration and playable Linux gameplay remain unfinished. In this pinned version, `LivingEntity.updateDataBeforeSync` invokes dirty effect synchronization; it is a separate phase from `tickEffects`. + +## Loom, crafter and recipe book + +The loom, the crafter and the recipe book run on code checked against +vanilla's own classes, and the game uses that code: + +- **Menus.** `horizon_client::menu` runs `LoomMenu` (selectable patterns, + `clickMenuButton`, the six-layer limit, quick moves, the result's `onTake`) + and the server's `CrafterMenu` over the block entity (the result following + the grid, `setSlotState`, a filled disabled slot enabling itself) besides the + other menus. `tools/test_menu_click_parity.py` compares 8,000 random click + sequences over 19 menus, with pattern button and slot state packets, with + vanilla's menu classes. The game's loom and crafter screens click through + `Game::menu_session` on the same engine. +- **Crafter block.** `tools/test_crafter_parity.py` runs `CrafterBlock.dispenseFrom` + and `CrafterBlockEntity.serverTick` over the block update oracle's level: + 4,000 crafts of datapack recipes (remainders and special recipes included) + with disabled slots and containers, other crafters or air in front, comparing + block changes, container contents, the animation ticks, triggered flag, + comparator signal, shot items, level events and the level random. +- **Recipe placement.** `horizon_client::menu::place` ports `ServerPlaceRecipe` + with `StackedContents`' recipe picker for the inventory, crafting table and + furnaces. Vanilla counts the available items in a hash map ordered by + identity hash codes, an order that changes between runs and decides which + of several fitting items fills an ingredient; `tools/test_place_recipe_parity.py` + hands the oracle's order to the Rust side and compares 6,000 placements. +- **The book's contents.** `recipe_book::ClientBook` keeps the displays as + `ClientRecipeBook`'s `HashMap` of display ids does (on the verified Java + `HashMap` port), whose order is the order of the buttons; + `tools/test_recipe_book_view_parity.py` runs the client's `ClientRecipeBook`, + `RecipeCollection` selection and the tab and page logic over 1,200 cases. +- **The player's book.** `recipe_book::Settings` with a `RecipeIndex` is + `ServerRecipeBook`: awards (advancements, `/recipe`, crafting) never learn + special recipes and count displays, and loading drops unknown recipes; + `tools/test_recipe_book_parity.py` compares 1,500 operation sequences and the + saved compound. +- **Screens.** `screen_layout` holds `LoomScreen.extractBackground` and + `CrafterScreen`'s decorations as draw calls the game paints; + `tools/test_screen_layout_parity.py` runs vanilla's screens on stand-in + menus and compares 1,600 call lists. + +Not compared yet: the recipe book's own drawing (tabs, buttons, the overlay +and ghost slots) and its text search, the banner preview's 3D flag (drawn as +the flat front face), furnaces awarding their recipes and experience when +their output is taken, and the limited crafting game rule.