Commit Graph

581 Commits

Author SHA1 Message Date
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 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 14f2057ccb Merge main into the mobs work
Merged local main into the mobs branch. Conflicts were in the mob event
enum (kept both LeashBreak and CureZombieVillager), the LAN and leads
module lists (kept all), horse NBT (chests are written for llamas,
donkeys and mules, with llama data kept), and chunk saving, which now
goes through mob_tree_nbt (main's passenger trees) with write_leash
applied inside it so leashes are still saved.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 07:25: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 3772ed871f Merge main into the mobs branch
Brings the llamas, breezes, sniffers, happy ghasts and copper golems on top of the raids, scoreboards, warden, sculk, creaking and golem-construction work already on main. Sniffer eggs now schedule their first hatch stage when placed, boosted on moss.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 06:58:50 +02:00
Ludovic Marie 302d96eeb1 Fix clippy findings in item models and pack mirroring
Rewrote a negated float comparison in the compass wobble check, merged two identical branches in the pack overlay mirroring, and replaced the empty item model test stub with small unit tests so the workspace passes clippy and tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 06:58:17 +02:00
Ludovic Marie b77056d49d Merge branch 'main' into worktree-agent-abc3c79c07e209fba 2026-10-10 06:37:57 +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 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 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 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 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 bec61f672a Merge branch 'main' into worktree-agent-a1352eba6412466b8 2026-10-10 03:49:13 +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 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 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 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 4b3858bb21 Merge main into the warden and sculk work 2026-10-09 14:05:35 +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 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