Commit Graph

2923 Commits

Author SHA1 Message Date
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 ab0e243689 Merge main into worktree-agent-a3f604d3c8055fe6e 2026-10-10 06:24:04 +02:00
Ludovic Marie a5a1da739a Merge branch 'main' into worktree-agent-a45c92d353e101334 2026-10-10 06:20:08 +02:00
Ludovic Marie abb21704dd Add stopwatch command and execute if stopwatch
Adds the stopwatches store saved in data/minecraft/stopwatches.dat, the /stopwatch create, query, restart and remove commands, and the execute if stopwatch condition, with the parse tree and parse fixture updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 06:20:08 +02:00
Ludovic Marie f140ccc8ef Merge main into worktree-agent-ab89288e40e0a400d 2026-10-10 06:18:37 +02:00
Ludovic Marie fa3acf58b8 Add pack overlays and filter blocks (WIP)
Resource packs now honour pack.mcmeta overlay directories and filter block patterns when layering files over the vanilla resources.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 06:04:52 +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 d34432cbfb WIP save changes
Work in progress on save syncing before merging main.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 06:01:59 +02:00
Ludovic Marie 2209950220 WIP: paletted containers and mesher changes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 06:01:10 +02:00
Ludovic Marie 9acb2492a4 Merge main into agent branch 2026-10-10 06:01:00 +02:00
Ludovic Marie bce2872386 Tidy LAN level event forwarding
Forward level events to LAN players without redundant integer casts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 06:00:26 +02:00
Ludovic Marie 08a7ee9673 Merge main into save work
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 03:52:47 +02:00
Ludovic Marie 13b9dad522 Merge main into interaction and inventory work 2026-10-10 03:52:33 +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 872d13f431 Merge branch 'main' into worktree-agent-afae8fa7e3c2bed72 2026-10-10 03:49:37 +02:00
Ludovic Marie 6837f486a5 Merge branch 'main' into worktree-agent-aa7f8206a004fc51a 2026-10-10 03:48:18 +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 2c9045649f WIP passengers, mob gear enchantments, held blocks
Work in progress on riders, enchanted spawn gear and held block rendering.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 03:47:46 +02:00
Ludovic Marie 3eabcc6bd5 Add LAN containers, menu and host actions
Remote players can now open and click containers, and the host gets a LAN menu and action hooks, building on the first LAN server.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 03:47:15 +02:00
Ludovic Marie e82bba3855 Build snow, iron and copper golems from blocks
A carved pumpkin or jack o'lantern placed on two snow blocks, on an iron T, or on a copper block now brings a golem to life: the pattern blocks vanish with break particles and a snow or iron golem appears; on copper the block turns into the matching copper chest facing the way the pumpkin did.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 03:46:40 +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 5a5bdf6a9b Merge branch 'main' into worktree-agent-a45c92d353e101334 2026-10-10 03:43:23 +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 513004936d Keep container names and saddle components, order and search the recipe book like vanilla
Containers now remember a custom name: it is read and saved as CustomName, taken from the item when placed (including by dispensers), shown as the screen title of chests, furnaces, the brewing stand, hoppers, dispensers and the crafter, and given back to the dropped item when the block is broken. Saddles on pigs, striders and horses are kept as full item stacks instead of a flag, so their components survive taming, the horse menu, dispensers, saving and death drops. The recipe book lists dye, transmute (shulker box, bundle, map cloning) and tipped arrow recipes, searches the tooltip lines and ids of a collection's results the way the vanilla search tree does, and squeezes new recipes' tabs and buttons once, saving the pending recipes as toBeDisplayed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 14:17:24 +02:00
Ludovic Marie 708f70cbbd Merge main into the LAN branch 2026-10-09 14:13:45 +02:00
Ludovic Marie b99de58761 Open worlds to LAN
A world can now be opened to the local network from World Options in the pause menu (LAN on or off, port, command access, forcing the game mode, plus the default and personal game mode, cheats and difficulty), or with horizon-ctl lan open. The hosted world runs a server inside the game that speaks the vanilla 26.3 protocol: server list status, offline-mode login, the configuration phase with the synchronized registries and tags (sent as known-pack references to vanilla clients and in full to clients that know no packs), then the play state with chunks and light, time, weather, the player list, the host and other guests as visible players, mobs and dropped items, block changes, chat and keep-alives. Network I/O runs on its own threads and a world that is not open pays one check per tick. A vanilla 26.3 client and a second Horizon client were verified joining and seeing each other and the terrain.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 14:12:31 +02:00
Ludovic Marie c1b96fe7ff Add happy ghasts
Happy ghast: an adult floats about, drifts toward a player holding snowballs or a harness, stays within 32 to 64 blocks of where it is, heals slowly (a point a second in rain) and takes a harness by interaction (shears take it off again, and it drops with the ghast); a harnessed adult can be ridden and flown with the movement keys, look direction and jump, and the rider lands on top when getting off. Ghastlings are smaller, follow players and adults, panic fast and grow up in 24000 ticks or faster with snowballs; a dried ghast block now hatches one. Harness and body models, tentacle animation, sounds and saving of the harness are in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 14:07:15 +02:00
Ludovic Marie 7cfb90538e WIP: options, timer, mouse (to be squashed) 2026-10-09 14:06:43 +02:00
Ludovic Marie 4b3858bb21 Merge main into the warden and sculk work 2026-10-09 14:05:35 +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 99b01f0cc0 Add the warden_spawn_tracker command and a dying warden's silence
The command clears the player's warden warning level or sets it from 0 to 4. A mob's death is now heard with the facts of the mob that died, so a dying warden stays silent to sensors.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:57:54 +02:00
Ludovic Marie 4652e983c5 Merge main into the scoreboard and command work
# Conflicts:
#	crates/horizon-client/src/game.rs
#	crates/horizon-client/src/game/commands.rs
#	crates/horizon-client/src/game/creatures.rs
#	crates/horizon-client/src/lib.rs
2026-10-09 13:57:10 +02:00
Ludovic Marie 661d2da89c Add sniffers
Sniffer: wanders, scents and sniffs, walks to diggable ground it has not explored, digs for a few seconds and drops a torchflower seed or pitcher pod, then stands up happy, with a cooldown of eight minutes before it sniffs again; follows torchflower seeds, panics fast, lays a sniffer egg instead of bearing young when bred, and keeps its explored positions in its save. Sniffer eggs now schedule their hatching when placed (faster on moss), crack twice and hatch a snifflet that takes 48000 ticks to grow up; the keyframe animations, the snifflet model and the lower digging body, dust and sounds are in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:57:07 +02:00
Ludovic Marie 88efc73ac1 Mesh biome tints through the zoomed biome and honour lighting options
The section mesher blended biome colours over quart cells at the section's
mid-height. It now follows ClientLevel.calculateBlockTint: each tinted block
averages the colours of the biomes BiomeManager picks (the eight-corner
zoom with the client's hashed seed) over the biomeBlendRadius square at the
block's own height, computed lazily per layer and column. The ao and
cutoutLeaves options are honoured too: flat lighting, skipped faces between
opaque leaves and a vertex layer flag that makes the terrain shader ignore
leaf alpha.

The section mesh parity gate gained biome-blend scenes (random zoom seeds,
radii 0 to 7, all 67 biomes, real Biome colour resolvers through a
BiomeManager in the Java oracle) and option scenes; all 1.0M quads of the 112
scenes match the client.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:52:25 +02:00
Ludovic Marie b39bf4c879 Add /place template
Place a saved structure template at a position with rotation, mirroring, integrity, seed and strict mode. Templates come from the world's generated structures first, then the vanilla template files. Block entities and saved entities are placed along with the blocks, and the template ids are offered as suggestions.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:48:40 +02:00
Ludovic Marie 682927cb69 Hear game events from players and mobs, light the darkness effect and persist the warden warning
Players and mobs now report footsteps, swimming, landings, splashes, damage, deaths, eating, drinking, container use, shots and landed projectiles, blasts, lightning and primed TNT to the vibration system, with sneaking and wool respected. The darkness effect fades in and out over 22 ticks, closes the fog in to 15 blocks, dims the lightmap with its pulse and hides the sun, moon and stars. Active sculk sensors shed redstone dust, charge and shriek level events show their particles, and the player's warning level is saved with the player data.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:43:56 +02:00
Ludovic Marie 1952d5b927 Add world and entity commands, loot, world border and force loading
New commands: /recipe, /damage (with at, by and from), /rotate (angles or facing), /swing, /playsound and /stopsound (per sound source, with the minimum volume rule), /particle (dust, block and the other particle options), /attribute (get, base set, reset and modifiers on the player; max health, speed and attack damage on mobs), /ride, /spreadplayers (with teams and a height limit), /forceload (force loaded chunks stay generated and simulated), /fillbiome (with a replace filter and biome tags), /worldborder (set, add, center, damage, warning and get, with the shrink and grow animation, the wall that stops the player and border damage, saved in world_border.dat) and /loot (replace, insert, give and spawn from loot tables, killed mobs, mined blocks and fishing). The sound engine learned to play a sound on a chosen sound source and to stop playing sounds by event or source.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:40:02 +02:00
Ludovic Marie 02d1507d39 Infect and cure zombie villagers
Villagers killed by a zombie, husk, drowned, zombie villager or zombified piglin rise as zombie villagers on Normal (half the time) and Hard (always), keeping their type, profession, level, trades, experience, gossip, equipment and baby state. Splash and lingering potions now give their timed effects to nearby mobs, so a weakness potion followed by a golden apple starts a cure of 3600 to 6000 ticks, sped up by nearby iron bars and beds; the zombie villager shakes, plays the cure sound and swaps weakness for strength. When the clock runs out it becomes a villager again with nausea, the curing player gains major and minor positive gossip (so trades get cheaper), the cured_zombie_villager advancement triggers, and the conversion sounds play. ConversionTime, ConversionPlayer, VillagerData, Offers, Gossips and Xp are saved, curing zombie villagers never despawn, and zombie villagers now draw their level badge and baby textures.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:35:15 +02:00
Ludovic Marie f1179cf141 Merge main into the loom and recipe book work
# Conflicts:
#	crates/horizon-client/src/containers.rs
#	crates/horizon-client/src/game.rs
#	crates/horizon-client/src/game/creatures.rs
#	crates/horizon-client/src/item_data.rs
#	crates/horizon-client/src/lib.rs
#	crates/horizon-client/src/save.rs
2026-10-09 13:32:57 +02:00
Ludovic Marie 239755edd8 Show the recipe unlocked toast
Unlocking recipes through advancement rewards now shows the "New Recipe(s) Unlocked!" toast with the recipe's result item and "Check your recipe book" underneath, one toast for a burst of unlocks.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:29:47 +02:00
Ludovic Marie 84dbcacd22 Add double chests, shulker box and shift-click container menus
Double chests now open as one 54-slot Large Chest (right half first, as in vanilla) with the 222-pixel screen and the inventory moved down, and both halves update their comparators and saves. Shulker boxes use their own texture and "Shulker Box" title, ender chests and barrels show their names, and the hopper minecart is titled as such.

Shift-click now moves stacks between the player inventory and chests, barrels, shulker boxes (which refuse other shulker boxes), ender chests, hoppers, dispensers and droppers the way the vanilla menus do, and in furnaces it sends smeltable items to the input, fuel to the fuel slot and takes results to the inventory.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:27:13 +02:00
Ludovic Marie c048369be8 Complete /execute and add functions, bossbars, items and tick
/execute now has every vanilla subcommand: store (result or success into scores, boss bars and entity, block or storage data with a type and scale), positioned over a heightmap, summon, on (owner, vehicle, controller, passengers, target, attacker), and the if/unless conditions score (all comparisons and matches), blocks, biome, predicate, function, data, items and slots on top of block, entity, loaded and dimension, with the vanilla pass, fail and count messages. Data packs in the world's datapacks folder (folders and zips) provide functions with comments, line continuation and $ macros, function tags including minecraft:load and minecraft:tick, and predicates; /function (with arguments or "with" sources), /return (value, fail and run), /schedule, /reload and /datapack list, enable and disable work against them. Also added: /bossbar with a boss bar overlay and saving, /item replace, fill and override over player, mob, armor stand, item frame and container slots, /random and /teammsg, and /tick rate, freeze, step and sprint on the game clock.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:26:35 +02:00
Ludovic Marie a77c929d81 Add breezes and wind charges
Breeze: chooses the nearest player or iron golem (or whoever hurt it), long jumps behind its target after inhaling, shoots a wind charge, slides to new spots and shoots again when stuck, with the vanilla timers, poses, keyframe animations, wind and eyes layers, sounds and block dust at its feet; arrows and other projectiles bounce off it. Wind charges: the item a player throws (half a second between throws), the charge a breeze shoots, and their burst, which does no damage but knocks players, mobs, projectiles and primed TNT away, cancels the thrower's fall, opens wooden doors, trapdoors and gates, presses buttons, flips levers, rings bells and snuffs candles; gust particles for the burst.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:24:12 +02:00
Ludovic Marie cdd5feb50c Add the horse inventory screen
Sneak-using a tamed adult horse, donkey, mule, skeleton or zombie horse, or pressing the inventory key while riding one, now opens its inventory: the saddle slot, the horse armour slot (horses only), the 5x3 chest of a donkey or mule with a chest, the mount drawn turning toward the cursor, and the player inventory below. Slots only take what the mount can wear (a saddle, or horse armour for horses), shift-click routes items the way the vanilla menu does, and the equip sounds play when the mount is saddled or armoured. The menu closes when the mount dies or is more than four blocks away.

The chest contents are saved with the mob (Items) and drop with the chest when the mount dies. The translation table also gains the entity, recipe book, banner pattern and toggle slot texts used by the new screens.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:22:33 +02:00
Ludovic Marie 2b618b1dfe Let witches heal raiders and name the ominous banner
During a raid a witch looks for the other raiders, throws them
Regeneration, or Healing once they are almost dead, and the potion cloud
heals every raider it reaches. The ominous banner shows its own name and
uncommon rarity in tooltips.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:19:05 +02:00
Ludovic Marie 7bbc85efa0 Add villager gossip, breeding and golem defence
Villagers remember players through gossip (major and minor, positive and
negative, and trading) that fades by the day and spreads when villagers
meet, saved with each villager. Hitting a villager earns a minor negative
mark, killing one in front of others a major one, and each trade a small
positive one; the reputation changes the prices, as does Hero of the
Village. Villagers that meet swap gossip, pass surplus food to hungry
neighbours (farmers to anyone) and wares to the profession that wants them,
pick up food and seeds from the ground into an eight-slot inventory, and
willing pairs (twelve food points, awake, adult) make a baby after about
fourteen seconds when a free bed is within 48 blocks. Frightened villagers
and gossiping groups that slept lately call for an iron golem, and golems
defend a village against a player whom a villager nearby holds at minus
100. Bottles from structure loot keep their amplifier.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:19:05 +02:00
Ludovic Marie 44adeb0d3c Add bad omen, raid omen and raids
Drinking an ominous bottle gives Bad Omen; inside a village it turns into
Raid Omen, and when that runs out a raid starts, or grows, around the
village points villagers have claimed (the raid_trigger statistic and the
voluntary exile trigger fire on the first omen). Raids are saved in
data/minecraft/raids.dat and send waves of pillagers, vindicators, evokers,
witches and ravagers (ravagers carrying pillagers, evokers or vindicators)
by difficulty and omen level, from a ring that closes in as the countdown
runs down, with the raid horn and a red notched boss bar that shows the
raiders left, Victory or Defeat. Raiders walk to the village, move between
beds, take back a dropped captain banner, celebrate a lost village, are
enchanted with Quick Charge or Sharpness at high omen levels and are
dropped from the raid when idle or far away. Killing one makes the player a
hero; a won raid grants Hero of the Village and the hero_of_the_village
trigger. Villagers hide in their beds during a wave, ring the bell before
one, celebrate a victory with fireworks, and toss gifts to a hero. /raid
start, stop, check, spawnleader, setomen, glow and sound are available.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:18:59 +02:00
Ludovic Marie af791c55b7 Add pillager patrols and the ominous banner
Every ten minutes or so, in daylight and a fifth of the time, a patrol of
pillagers spawns 24 to 48 blocks from a player who is not near a village,
once the world is five days old and outside mushroom fields. The leader
wears the ominous banner and heads for a distant target in ten block hops
with its companions following; patrols hold their ground, shout to nearby
raiders and attack together once something comes close. Natural spawns lead
a patrol one time in seventeen. A fallen banner always drops, and a captain
pillager drops an ominous bottle that gives Bad Omen when drunk. Patrol
state, the banner's patterns and the bottle's amplifier are saved as vanilla
NBT.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:18:56 +02:00
Ludovic Marie 2ad11eb68d Add the creaking and the creaking heart
A creaking heart in a pale oak trunk now follows its logs: placed or updated between two logs on its axis it wakes at night (12600 to 23400 in the overworld) or goes dormant by day, and stays uprooted without them. An awake heart with a player within 32 blocks spawns a linked creaking within 16 blocks, keeps its UUID in the saved block entity, reports the distance to it as a comparator signal, and lets it go when the day comes, it strays more than 34 blocks or a player stands inside it. The creaking freezes while any player looks at it, wakes when one looks from within 12 blocks, then hunts the nearest visible player and hits every 40 ticks. Bound to a heart it takes no damage; hits only make it sway and, when a player did it, make the heart send trail particles and sometimes spread resin clumps over nearby logs. Breaking the heart makes its creaking twitch to death, and removing the block any other way tears it down in a burst of crumbling pale oak. It has the vanilla model, animations (walk, attack, invulnerable, death), glowing eyes, sounds and NBT home_pos, and the trail particle exists now.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:15:05 +02:00
Ludovic Marie 6b80f9c1aa Add the recipe book
The inventory, crafting table, furnace, blast furnace and smoker screens get the green recipe book button, which opens the book beside the menu and moves the menu over. The book has the search tab and one tab per category (hidden until it holds a recipe), a search box matching recipe names (or @namespace), the craftable-only toggle, pages of 20 recipe buttons that cycle through the recipes of a group, right-click for the alternatives overlay, and tooltips. Clicking a recipe moves the items from the inventory into the grid (shift fills the biggest stack, clicking again adds one more set), and when items are missing the grid is cleared and the recipe is shown as a ghost over the slots.

Which recipes appear comes from the advancement rewards already unlocked; the open and craftable-only settings of each book and the unlocked recipes are saved in the player's recipeBook compound. Recipes now keep their category and group from the data pack.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 13:08:12 +02:00