Commit Graph

4750 Commits

Author SHA1 Message Date
Ludovic Marie 5731a9406f Merge branch 'parity/dedicated-server' (before its WIP commit) into parity-base 2026-10-12 17:55:17 +02:00
Ludovic Marie 404072d5e5 Merge branch 'parity/warden-sculk' (before its WIP commit) into parity-base
# Conflicts:
#	crates/horizon-client/examples/entity_anim_fixture.rs
#	crates/horizon-client/src/game.rs
#	crates/horizon-client/src/game/creatures.rs
#	tools/test_entity_model_parity.py
2026-10-12 17:55:17 +02:00
Ludovic Marie 2e3063d821 Merge branch 'parity/mobs-b' into parity-base
# Conflicts:
#	crates/horizon-client/examples/entity_anim_fixture.rs
#	crates/horizon-client/examples/mob_ai_probe.rs
#	crates/horizon-client/src/game/creatures.rs
#	crates/horizon-client/src/mobs.rs
#	crates/horizon-client/src/mobs/ai.rs
#	mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMobAiOracle.java
#	tools/test_mob_ai_parity.py
2026-10-12 17:54:20 +02:00
Ludovic Marie f02c47d289 Merge branch 'parity/mobs-a' into parity-base 2026-10-12 17:50:53 +02:00
Ludovic Marie 14bff2518f Merge branch 'parity/raids' into parity-base
# Conflicts:
#	README.md
#	docs/rust-parity.md
2026-10-12 17:50:53 +02:00
Ludovic Marie c195cd3239 Merge branch 'parity/tablist-border' into parity-base
# Conflicts:
#	README.md
#	crates/horizon-client/src/lib.rs
#	docs/rust-parity.md
2026-10-12 17:50:31 +02:00
Ludovic Marie 69b191b1f4 Merge branch 'parity/loom-crafter' into parity-base
# Conflicts:
#	README.md
#	crates/horizon-client/src/game/dispense_fixture.rs
#	docs/rust-parity.md
#	mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDispenserOracle.java
2026-10-12 17:48:44 +02:00
Ludovic Marie b6fa612bee Merge branches 'parity/tooling', 'parity/score-subtitles' and 'parity/block-followups' into parity-base 2026-10-12 17:47:58 +02:00
Ludovic Marie 9c465af186 WIP: unfinished spawn-gear parity work, stopped by Ludovic
Uncommitted changes the agent had in progress when it was stopped on
2026-10-12; may not build or pass its harnesses yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:46:50 +02:00
Ludovic Marie 5ea641a7c2 WIP: unfinished villager-social parity work, stopped by Ludovic
Uncommitted changes the agent had in progress when it was stopped on
2026-10-12; may not build or pass its harnesses yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:46:50 +02:00
Ludovic Marie 613a0dd3f1 WIP: unfinished dedicated-server parity work, stopped by Ludovic
Uncommitted changes the agent had in progress when it was stopped on
2026-10-12; may not build or pass its harnesses yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:46:50 +02:00
Ludovic Marie edd598cc68 WIP: unfinished warden-sculk parity work, stopped by Ludovic
Uncommitted changes the agent had in progress when it was stopped on
2026-10-12; may not build or pass its harnesses yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:46:50 +02:00
Ludovic Marie 54b939e717 WIP: unfinished old-saves parity work, stopped by Ludovic
Uncommitted changes the agent had in progress when it was stopped on
2026-10-12; may not build or pass its harnesses yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:46:50 +02:00
Ludovic Marie c90cd5f072 Match vanilla llama caravans, trader llamas, breeding and wolves
A lead gives its mob a home at the holder (PathfinderMob.whenLeashedTo)
and every random position helper honours homes (generateRandomPos-
TowardDirection's lean back and GoalUtils.isRestricted), as the happy
ghast's float area now does too. LlamaFollowCaravanGoal keeps 2.1F, a
llama's baby and the breeding experience are drawn from the parent's
random, wolves run from llamas by strength (WolfAvoidEntityGoal), a
growing mob refits its box (fudgePositionAfterSizeChange) and a happy
ghast's new controls want nothing. Scenarios can lead mobs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:45:09 +02:00
Ludovic Marie ca1bc52a49 Stop the jukebox's song and the beacon as their block entities go
LevelChunk.removeBlockEntity calls setRemoved: a jukebox reports its song
stopping (the jukebox_stop_play game event and level event 1011) and a
beacon plays its deactivation, whatever the flags. A record popped from a
replaced jukebox stops a playing song first and updates the neighbours as
JukeboxBlockEntity.onSongChanged does (a redstone wire beside it can pop).
The block update oracle removes block entities the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:44:54 +02:00
Ludovic Marie b0ce83dd2d Port the 1.17 to 1.18 chunk height, biome and tick fixes (2825 to 2846)
ChunkHeightAndBiomeFix, ChunkProtoTickListFix, ChunkRenamesFix,
OverreachingTickFix, SpawnerDataFix, the world generation settings fixes
and the Caves & Cliffs biome and advancement renames, with the chunk's
Level tag and UNTAGGED_SPAWNER in the schema walker. A 1.17.1 sample
world upgrades as vanilla's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:42:59 +02:00
Ludovic Marie 63f628762f Tick creaking hearts as vanilla and compare them with the oracle
mobs::creaking_heart is CreakingHeartBlockEntity: the ticker drawn from
the level random, the state following the night and the logs, the
protector spawned with SpawnUtil.trySpawnMob (five tries within 16
blocks, on top of a collider, then EntityType.create's yaw and
Mob.finalizeSpawn's follow range bonus), its sounds, letting it go by
day, beyond 34 blocks or with a player stuck in it, and when a player
hurts it the trails and the resin spread over the logs. The game ticks
its hearts through it, and its level random now carries on between
ticks.

The mob AI harness gains hearts: the oracle places them when a scenario
starts, ticks block entities after the mobs, seeds the creakings the
level creates and adds them to the scenario, prints each heart's state
and block entity, and lets the player hit a mob (hurt T I). Five heart
scenarios (night, day, uprooted, no player near, hit twice) match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:40:47 +02:00
Ludovic Marie e5dc127ab2 Document scoreboards, teams and subtitles and their harnesses
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:39:55 +02:00
Ludovic Marie 05228e0fe2 Document the loom, crafter and recipe book harnesses
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:39:45 +02:00
Ludovic Marie b5c0bf7859 Draw the loom and crafter screens as the vanilla client does
LoomScreen.extractBackground (slot icons, scroller, pattern buttons
with their swatches and tooltip, the result banner or the six-layer
error) and CrafterScreen's background, disabled slots and redstone
arrow become screen_layout calls the game paints. A new harness runs
vanilla's screens on stand-in menus and compares 1,600 call lists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:38:25 +02:00
Ludovic Marie 4b776a45d8 Tick blocks before entities, as ServerLevel.tick does
The scheduled and random block ticks now run after the player's digging
and before any entity, so items a dispenser shoots or a block pops get
their first tick on the tick they appear, as vanilla's do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:36:33 +02:00
Ludovic Marie 225c12f4cc Move subtitles into the HUD overlays and save scoreboards end to end
The subtitle overlay now lays out GuiDraw calls in hud_overlays and the
game paints them like the other overlays. Hover events that show an entity
save its UUID as an int array, as UUIDUtil.CODEC does. The save round trip
builds a vanilla scoreboard with every saved field (objectives, number
formats, display slots, locked and displayed scores, teams with every
option) and requires Horizon to save scoreboard.dat as vanilla did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:35:05 +02:00
Ludovic Marie 01db93a987 Port server.properties, eula.txt and the server user lists
DedicatedServerProperties with every key, default, parser and serializer,
java.util.Properties load/store, Eula and the four StoredUserList files,
checked against the pinned server JAR by test_server_files_parity.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:34:57 +02:00
Ludovic Marie 8f80f8decf Document block entity removal, immediate drops and copper golems
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:33:49 +02:00
Ludovic Marie 13102892c4 Render, save and gift copper golems as vanilla does
The copper golem takes its weathering's texture and glowing eyes, saves
and loads next_weather_age and weather_state, starts with its weathering
unset instead of weathering on its first tick, and throws what it carries
to the player as BehaviorUtils.throwItem does. Iron golems offer their
poppy to copper golems too (#candidate_for_iron_golem_gift) and put it on
an empty antenna when the offer runs out beside one.

The entity model harness now poses the copper golem with its idle and
chest interaction animations (44 cases), and the entity death loot harness
includes it (1,595 cases over 88 types); both match vanilla.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:31:52 +02:00
Ludovic Marie 82eda1d8bf Port the 1.18 structure fixes (2967, 2970) and add a 1.18.1 sample world
Old server jars run on Mojang's own Java runtimes, pinned in
research-lock.json and installed beside the shared vanilla data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:30:48 +02:00
Ludovic Marie 515d15d36f Merge the integration branch into parity/tablist-border
Keep the integration branch's StringSplitter port and HUD overlays: the tab
list now emits hud_layout::GuiDraw calls and wraps with its split_lines, and
the vignette's border warning comes from WorldBorder::warning_strength
through hud_overlays::border_warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:25:13 +02:00
Ludovic Marie a425de4c1c Merge the integration branch: villager brain, mob AI fixes and HUD overlays
The raid bars now draw through hud_overlays. Villagers' raid field is
what getRaidAt finds where they stand, with lost raids and the wave flag
kept apart, so the brain's SetRaidStatus, ResetRaidStatus (which resets on
a lost raid), ReactToBell and raid packages read vanilla's conditions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:23:59 +02:00
Ludovic Marie 81e97617af WIP: share the creaking heart's block entity tick
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:22:02 +02:00
Ludovic Marie e664d2f7c4 Merge origin/t3/achieve-full-parity into parity/block-followups
Explosion drops keep their random sequences and the pot's dynamic drops;
/setblock destroy and /fill destroy run Level.destroyBlock through the
behaviour library, so the block entity spills as vanilla's does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:19:39 +02:00
Ludovic Marie e723c8ad6c Merge origin/t3/achieve-full-parity into parity/score-subtitles
Mobs push through the new pushEntities with the teams' collision rules;
lang keeps the integration branch's deprecated.json handling; the
scoreboard keeps this branch's vanilla hash orders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:19:13 +02:00
Ludovic Marie 2edae5746a Merge origin/t3/achieve-full-parity into parity/mobs-b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:18:39 +02:00
Ludovic Marie 5dd2840cee Merge remote-tracking branch 'origin/t3/achieve-full-parity' into parity/warden-sculk
# Conflicts:
#	crates/horizon-client/src/game.rs
#	crates/horizon-client/src/game/creatures.rs
2026-10-12 17:18:11 +02:00
Ludovic Marie a5eb241c32 Merge remote-tracking branch 'origin/t3/achieve-full-parity' into parity/loom-crafter
# Conflicts:
#	crates/horizon-client/src/game/commands/world_cmds.rs
2026-10-12 17:15:59 +02:00
Ludovic Marie 8393b8de0f Match vanilla breeding sniffers and tempted happy ghasts
Mobs set each other's brain memories within the tick (the breed target
and lockGazeAndWalkToEachOther), the partner rests and forgets at the
birth, and an animal in love draws its heart particle randoms. The adult
happy ghast's TemptGoal.ForNonPathfinders ticks every other tick and
follows creative players. The mob AI scenarios can give the player an
item and a mob love, taming, an age or a llama strength.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:15:34 +02:00
Ludovic Marie 233dadf29f Run harnesses on the ThinkPad too, two at a time at nice 19
A sample of 27 harnesses (the 20 quickest, options, datafix's six shards)
passed there; it builds against the same ALSA headers as the desktop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:15:18 +02:00
Ludovic Marie b56b4c3cea Bring the copper golem into the game and build it and shear it as vanilla does
The copper golem code (its goals, chest transport, weathering, statues and
interactions) was in the tree but not compiled; it is now a species with
its model, keyframe animations, sounds and game hooks. Its antenna flower
sits in the saddle slot as vanilla's EQUIPMENT_SLOT_ANTENNA, sheared by
players and dispensers with the unequip event and the 1.5-up drop, and
dropped with the carried stack as preserved equipment. A pumpkin on a
copper block builds it after the snow and iron golem patterns: both blocks
clear, the block becomes the matching copper chest (CopperChestBlock
getFromCopperBlock with the least oxidized of connected chests), and the
golem takes the block's weathering and plays its spawn sound. Weathering
draws from the level random, the statue pose from the golem's own.

The dispenser harness now builds copper golems and shears and equips them:
6000/6000 cases match.

Block.popResource of tall flowers and flower beds and the composter's
bone meal pop when the behaviour asks, as vanilla does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:14:20 +02:00
Ludovic Marie 8ba728287f Order the recipe book's buttons as the vanilla client does
ClientRecipeBook keeps the displays it was sent in a HashMap of display
ids, whose iteration order (buckets, then arrival) orders the
collections; the game now keeps such a client book (on the verified
Java HashMap port) synced with the server book, with display ids
numbered as RecipeManager does. A new harness runs the client's
ClientRecipeBook, RecipeCollection selection and the tab and page logic
of RecipeBookComponent over 1,200 cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:14:14 +02:00
Ludovic Marie 59a966a9e3 Compare breezes and creakings with vanilla in the mob AI harness
Eight scenarios: a breeze alone and fighting a player near, inside and
beyond its jump circle; a creaking alone, watched, unwatched, and woken
then hunting once the player turns away (a new player turn= option).
The oracle now faces the player +z with its head too (it kept a random
head yaw from its creation, which the breeze's jump target reads).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:14:07 +02:00
Ludovic Marie 245ceb5428 Port the breeze and creaking brains
monster_brain runs BreezeAi and CreakingAi as vanilla's Brain does:
the sensors with their random first delays, memories that expire, the
core, idle and fight activities, and each behaviour (Shoot, LongJump,
ShootWhenStuck, Slide, SlideToTargetSink, StartAttacking, MeleeAttack,
RunOne...) started and ticked in vanilla's order, with durations drawn
from the level random. It reuses the villager brain's memory slots.

Breeze.tick draws its particle count and whirl clock before the entity
tick; its whirl and idle sounds are local (client) sounds; it is immune
to fall damage and plays its landing sound. Entity.lookAt and the long
jump's atan2 (an fdlibm port) are bit-exact. A frozen creaking keeps
thinking while its navigation and controls wait, stopInPlace zeroes its
motion, and its attack sound follows the hit. Mobs update their ground
flag on every move, as a server's authoritative entities do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:14:02 +02:00
Ludovic Marie 839ea6d04c Give the level random back to the level after the mobs' ticks
Brain behaviours draw from the level random (DoNothing, POI scans): the
game lends it to the mobs and keeps what they drew.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:13:57 +02:00
Ludovic Marie b98c67b04f Merge remote-tracking branch 'origin/t3/achieve-full-parity' into parity/mobs-a 2026-10-12 17:13:55 +02:00
Ludovic Marie d98576a1a4 Document remote hosts, shards, Rust scopes, flake checks and trial merges
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:11:09 +02:00
Ludovic Marie a4355c7c9b Catch flaky harnesses: --repeat, and three runs in the gate
parity.py --repeat N runs each harness N times; its runs must agree, else it
is reported FLAKY and recorded as failing. Later rounds run on the machine
that ran the first, reusing its oracle results, and never two at once there.
With --flake-check REF (passed by gate.py, merge base with parity-base; by
supervise.py integrate, the integration branch before the merge), harnesses
whose script, oracle or probe is new or changed must pass three runs in a
row; a pass records its rounds so it is not repeated again. gate.py matches
shards of a known failure by the harness's name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:10:08 +02:00
Ludovic Marie bbae62fc4b Render subtitles exactly as vanilla's SubtitleOverlay
The overlay listens to the sound engine from the frame that renders it with
Show Subtitles on until one renders with it off (keeping its captions),
forgets plays as it renders, picks the latest play in range (the first of
full ties), fades in float arithmetic, lays the boxes out in integers under
the pose translation and takes its background from the text background
opacity options. Translations now apply the game's deprecated.json renames,
as ClientLanguage does ("Chick hurts"). tools/test_subtitle_parity.py runs
vanilla's SubtitleOverlay on 1500 scripted cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:07:47 +02:00
Ludovic Marie 000e676b57 Compare the warden's animations and emissive layers with vanilla
The entity model harness now sets the warden's render state (tendril and
heart animation, the roar, sniff, emerge, dig, attack and sonic boom
animation states) and bakes its four emissive layers (tendrils, heart,
bioluminescent skin, pulsating spots) over WardenModel: 430 cases match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:06:36 +02:00
Ludovic Marie 621fca874c Keep the player's recipe book as vanilla's ServerRecipeBook does
The known and highlighted recipes, the book settings and the saved
recipeBook compound now live in one place (recipe_book::Settings with
a RecipeIndex of learnability and display counts): advancement rewards,
/recipe give and take (counting displays, never special recipes) and
crafting a recipe award through it, and loading drops unknown recipes
instead of rebuilding the set from done advancements. A new harness
compares 1,500 operation sequences with vanilla's ServerRecipeBook and
its codec.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:02:53 +02:00
Ludovic Marie 2f232d955c Charge sculk catalysts when the killing blow lands
Mobs die (LivingEntity.die: the death event, catalysts, loot and
experience) when they are killed, not when their death animation ends.
Catalysts take a death in the dispatcher's order (nearest by exact
distance, then visiting order); experience orbs draw their merge id from
the level random and their motion from their own. The sculk harness
gains catalyst scenarios: kills by the player near catalysts over
random terrain, with blooms, charge cursors and the sculk they spread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:01:59 +02:00
Ludovic Marie 4a2d801d2b Apply teams in gameplay: targeting, explosions, pushing, names, deaths
Mobs on the player's team never target the player; a creeper's blast
spares its team mates when its team has no friendly fire; mobs push each
other only as their collision rules allow; name tags follow the team's
name tag visibility, show the team's prefix, suffix and colour and the
score of the objective displayed below names; the player's own death
message stays out of chat when the team hides death messages. The
criteria that follow the player compare health as a float, round armor
down and give auto-updated displays the player's team-formatted name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:52:15 +02:00
Ludovic Marie acf4df3a90 Place recipe book recipes as vanilla's ServerPlaceRecipe does
ServerPlaceRecipe and StackedContents' RecipePicker run on the menu
engine (horizon_client::menu::place) for the inventory, crafting table
and furnaces: testClearGrid, clearGrid with placeItemBackInInventory,
the biggest craftable stack, clamping to stack sizes and moveItemToGrid.
A new harness compares 6,000 placements with vanilla; vanilla's item
order follows identity hash codes, so the oracle hands its order to the
Rust side. The game's recipe book now places through the engine, and
its craftable filter uses the same counts and placement ingredients.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:51:38 +02:00