Commit Graph

4750 Commits

Author SHA1 Message Date
Ludovic Marie 5b53d37e30 Compare item decorations with GuiGraphicsExtractor.itemDecorations
The decor cases run vanilla's itemDecorations on stacks with counts,
durability (Item.getBarWidth/getBarColor), unbreakable stacks and item
cooldowns ticked through ItemCooldowns. Horizon's item drawing now uses
the same layout: the bar rounds and colours like vanilla's and the count
sits at vanilla's offsets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 13:13:12 +02:00
Ludovic Marie 6bc85d48c6 Tick chest lids and enchanting books as vanilla and drive the renderer with it
block_entity_anim now also ports ChestLidController (chests, trapped and
copper chests, ender chests: triggerEvent(1, openCount), tickLid,
getOpenness), ChestBlock.opennessCombiner and ChestRenderer's lid curve,
and EnchantingTableBlockEntity.bookAnimationTick with its render state
(nearest non-spectator player by feet position within 3 blocks, Mth.atan2,
the class's shared RANDOM). The renderer pairs a double chest half with its
neighbour only as DoubleBlockCombiner does (same block, other half, same
facing) and reads the book from BlockAnim instead of ticking its own copy.

The game keeps a BlockEntityAnims and runs the client tickers of every
loaded animated block entity each tick: chest lids, books, shulker boxes,
bells (resonance sound, entity-effect particles, raider glow), conduits
(nautilus particles) and dragon/piglin heads. Opening and closing chests,
ender chests and shulker boxes sends the opener-count block event (both
halves of a double chest); a ring's block event reaches the bell through a
new LevelEvent::BlockEntityEvent. The renderer now gets this state instead
of BlockAnim::default(), so shulker lids, bells, conduits and heads move.

block_entity_anim harness: 256/256 cases (new: 48 chest, 36 book).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 13:12:30 +02:00
Ludovic Marie f55b4281e5 Compare boss bars, the jump bar and the scoreboard sidebar with vanilla
The oracle fills a BossHealthOverlay with LerpingBossEvents, runs
JumpableVehicleBar on a jumpable mount and displayScoreboardSidebar on a
real Scoreboard with teams, display names and number formats. The game
collects the dragon, wither, raid and custom bars into one
BossHealthOverlay layout (the backgrounds and notches now draw in vanilla's
order) and draws the sidebar with the text background options and
String.CASE_INSENSITIVE_ORDER.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 13:10:33 +02:00
Ludovic Marie 613702c0a7 Render End portals and End gateways as vanilla's block-entity renderers
TheEndPortalRenderer and TheEndGatewayRenderer: the position-only portal
cube in FaceInfo order (only the vertical faces for portals, the faces
Block.shouldRenderFace leaves for gateways) and the gateway beam through a
shared submitBeaconBeam. The beacon beam now goes through the same
function. The client does not track gateway ages and cooldowns yet, so
gateways in game render settled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 13:05:36 +02:00
Ludovic Marie fda4d65a02 Give the block-entity render oracle an item resolver and an End gateway level
Campfires and brushable blocks resolve their items (empty here) through the
context's ItemModelResolver, which was null. End gateways read the level for
their beam (max y, game time) and visible faces, so they get a stub level
with the case's neighbours, light, build height and game time. New cases
cover gateways spawning, cooling down and settled against neighbours, and
End portals beside the same neighbours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 13:05:36 +02:00
Ludovic Marie b7cfe5578c Compare effect icons, titles, the action bar and the selected item name with vanilla's Hud
The HUD harness now draws cases by kind. The oracle runs Hud.extractEffects,
extractTitle, extractOverlayMessage and extractSelectedItemName after
replaying setTitle/setTimes/setOverlayMessage and Hud.tick, and
hud_overlays lays out the same state: MobEffectInstance ordering through
Java's small-array TimSort, the title and action bar fades, the backdrop
from the text background options and the tool highlight timer. The game
draws its effect icons, titles and action bar through these layouts and
now shows the selected item name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 13:05:05 +02:00
Ludovic Marie 06abd528c5 Merge remote-tracking branch 'origin/t3/achieve-full-parity' into parity/rendering-anim 2026-10-12 12:43:27 +02:00
Ludovic Marie c36190dc4d Merge remote-tracking branch 'origin/t3/achieve-full-parity' into parity/rendering-hud 2026-10-12 12:43:16 +02:00
Ludovic Marie 0b86f5f4c2 Merge remote-tracking branch 'origin/t3/achieve-full-parity' into parity/entity-ai 2026-10-12 12:43:08 +02:00
Ludovic Marie b3b6194a91 Add the plans for after the rewrite to the README roadmap
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 02:49:42 +02:00
Ludovic Marie 6fdd7f3bd7 Add the Horizon logo, banner and in-game screenshots to the README
An original logo (a sun setting behind a blocky horizon), a banner and a social
preview card, and six screenshots captured in the Rust client. The README opens
with badges, a short pitch and a gallery; a test keeps the parity badge in step
with the subsystem table. Packaged builds use the logo as their menu icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 02:47:52 +02:00
Ludovic Marie 312d5fc7d2 Hide the whole HUD and the hand with F1, as vanilla does
F1 only hid the chat. Hud.extractRenderState hides the camera overlays,
crosshair, hotbar, effects, bars, sidebar, action bar, titles and chat, and
GameRenderer.renderItemInHand skips the hand; the sleep overlay, debug screen
and open screens still draw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 02:47:37 +02:00
Ludovic Marie fae208deb6 Merge pull request #39 from ludovic111/docs/professional
Docs: professional README and no personal details
2026-10-12 02:18:57 +02:00
Ludovic Marie 83bcfb15af Docs: professional README and no personal details
Restructure the README around what Horizon is, its status, how to build it
from your own copy of the game, and its parity table. The Java performance
pack material and the research lab notes move to docs/java-packs.md and
docs/research-lab.md. The target platform is stated generically instead of
naming a machine, the stale list of missing mobs is dropped in favour of the
audited table, and the legal notice follows Mojang's usage wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 02:14:10 +02:00
Ludovic Marie 6c90e42675 Install ALSA headers for the CI lint and test job
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 02:02:37 +02:00
Ludovic Marie 37898e856b Build from the user's own copy of the game instead of downloading it
Horizon no longer fetches anything of Minecraft from Mojang's servers. The
client jar, version JSON, libraries and assets come from the user's official
launcher install, and the server jar is one they downloaded themselves
(--server-jar or HORIZON_SERVER_JAR). Every file is checked against checksums
pinned in research-lock.json, and the prepared .local/ layout is byte-identical
to the old downloads, so the harnesses and the native client are unchanged.

CI keeps the offline checks on GitHub's runners; the vanilla comparisons and
the mod build need the game, so they move to a manual job on a self-hosted
runner that holds the maintainer's own copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 02:00:18 +02:00
Ludovic Marie b036c0c90d Document the mob AI harness --trace option
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:32:11 +02:00
Ludovic Marie d572cd7262 Link only the vanilla data into new worktrees
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:38:16 +02:00
Ludovic Marie 82dceec5e7 Keep the datafix sample worlds with the shared vanilla data, and generate them when missing
The old server jars and the 22 worlds made from them are inputs, but they
lived in each worktree's .local and were lost when its outputs were
cleared. They now sit beside the shared vanilla data, written atomically,
and the harness generates any that are missing (under a lock, since
several worktrees may run it at once).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:36:09 +02:00
Ludovic Marie c7a2fbb182 Match vanilla wither tick order, underwater checks and gravity
The wither's customServerAiStep (charging, side heads, block breaking,
healing) now runs inside serverAiStep, and aiStep draws the heads' smoke
particle offsets after travel as vanilla does; its steering uses the 0.6F
and Mth.atan2 float maths, and its level-event sounds (shoot, spawn, block
break) no longer draw from its random: MobEvent::LevelEventSound lets the
client pick their pitch. Entity.getGravity is zero while isNoGravity, which
the flying move control sets. Drowned swim with isUnderWater (the previous
tick's eye state, Entity.wasEyeInWater), and the eyes count as in water per
26.3's EntityFluidInteraction (between a water block's bottom and its camera
height) rather than the older 0.11 offset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:18:23 +02:00
Ludovic Marie a466af6adc Match vanilla projectile randoms, witch target goal and enderman goal names
Projectiles shot by mobs (arrows, splash potions, snowballs, llama spit,
wind charges, crossbow bolts, tridents) take their spread, and arrows their
base damage, from the new projectile's own random as vanilla does, leaving
the shooter's random alone. The witch's player target goal reports as
NearestAttackableWitchTargetGoal (NearestTarget gains a subclass label), and
the probe names the enderman goals as vanilla's classes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:02:46 +02:00
Ludovic Marie feb043fda6 Merge parity/blocks into parity/hud
Block loot keeps one random-sequence path: the blocks side's block_loot
with the generic loot evaluator, and /loot uses the shared loot_sequence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 19:02:13 +02:00
Ludovic Marie 5ede186d40 Integrate several branches behind one gate
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 18:56:43 +02:00
Ludovic Marie d2c91b513b Match vanilla drowned AI, skeleton weapon goals, trader look goals and monster idle time
Drowned register Zombie's goals and then Drowned.addBehaviourGoals (go to
water, trident and melee attacks with okTarget, go to beach, swim up,
RandomStrollGoal) with DrownedMoveControl, Drowned.travelInWater and
AmphibiousPathNavigation. Skeletons get their bow from finalizeSpawn and
pick the bow goal or the AbstractSkeleton$1 melee goal from the held item,
as reassessWeaponGoal does. Monster.aiStep adds 2 to noActionTime in bright
light (raiders always), which stops RandomStrollGoal; LookAtPlayerGoal
supports Mob.class targets and InteractGoal, used by the wandering trader
(with vanilla's AvoidEntityGoal order), illagers, ravagers and vexes.
Entities below the world take 4 damage a tick instead of vanishing, water
travel uses the 0.8F/0.6F/0.3F float constants, and MobWorld carries the
level's sea level.

The oracle refreshes the player's water state after placing it (it is never
ticked, so isInWater kept the previous scenario's value) and keeps its world
under the harness build directory, deleting it before halting instead of
leaving /tmp/horizon-mob-ai* behind. The probe reports KILLED removals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 18:56:36 +02:00
Ludovic Marie e8f2ccd403 Fail the gate when the harness runner dies, and clear large harness outputs
tools/gate.py took a crashed tools/parity.py for a pass with no new
failures. The runner now records each completed run, and the gate fails
unless its own run finished. A missing or empty trace (the disk was full)
no longer crashes the runner.

After a harness passes, the runner deletes its large regenerated outputs
(64 MB or more), keeping the vanilla oracle outputs that reusing an oracle
run needs. Full suites left 2-4 GB files in every worktree and filled the
disk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 18:56:28 +02:00
Ludovic Marie d4144d33b4 Match vanilla zombie turtle-egg goal, entity pushing and raider goal order
Zombies (and husks, drowned, zombie villagers, zombified piglins) now
register ZombieAttackTurtleEggGoal first, as vanilla does, so their goal
selector draws the same random numbers. LivingEntity.pushEntities runs in
aiStep against the player and other mobs, with pushes to other mobs applied
at once as Entity.push does (replacing the post-tick push_apart). Spider
target goals check the light before their random interval, LookAtPlayerGoal
uses the non-combat targeting conditions, raiders register the
PatrollingMonster/Raider goals before their own, and the witch runs its
aiStep (heal cooldown, drinking, particle roll) before super.aiStep with
NearestHealableRaiderTargetGoal's nextBoolean.

The mob AI oracle's player is now a fully loaded, hurtable client: its
connection starts with a 60-tick load timer and 26.3 moved the hurt cooldown
to damageCooldownTime, both of which only ServerPlayer.tick counts down, so
whether mobs could hurt the player depended on the scenario order. The probe
reports the player's hurt sound, and an rng-trace feature records the call
sites of Horizon's mob random draws next to the oracle's trace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 18:24:38 +02:00
Ludovic Marie 7d35a25906 Format and lint the command parity changes
Clippy and rustfmt clean, and the scoreboard test now expects vanilla's
removeObjective, which keeps holders tracked without scores.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 18:00:32 +02:00
Ludovic Marie 4eb2f53ffb Merge branch 'parity-base' into parity/saves
# Conflicts:
#	README.md
2026-10-11 17:51:57 +02:00
Ludovic Marie 99057953e0 Mark dispensers as matching vanilla in the parity table
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 17:51:49 +02:00
Ludovic Marie 2e775aff2f Merge parity-base into parity/hud 2026-10-11 17:51:39 +02:00
Ludovic Marie d0815052cd Merge branch 'parity-base' into parity/blocks 2026-10-11 17:51:37 +02:00
Ludovic Marie 168bc1d0a3 Merge branch 'parity/loot-spawn' into parity-base 2026-10-11 17:36:20 +02:00
Ludovic Marie 2eb688cc6a Decrypt bytes already read when a connection enables encryption
Encrypted bytes that arrived in the same read as the last plain packet
stayed in the buffer undecrypted, and the connection then waited forever
for a frame it could not parse. The loopback test hit this under load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 17:36:20 +02:00
Ludovic Marie a919e44050 Run /locate biome and poi and /place feature, jigsaw and structure as vanilla
/locate biome samples the biome source like BiomeSource.findClosestBiome3d,
/locate poi scans loaded chunks for PoiTypes block states within 256 blocks,
/place feature places the configured feature with the level random,
/place jigsaw assembles pieces with JigsawPlacement.addPieces and places
them into the level, and unknown structures or pools report vanilla's
errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 17:35:55 +02:00
Ludovic Marie 6ed726e935 Merge branch 'parity-base' into parity/loot-spawn 2026-10-11 17:26:12 +02:00
Ludovic Marie d46fa60400 Run /compute as vanilla's ComputeCommand
Context int and float providers (inline or registered) evaluate with
Java's arithmetic, exceptions and rounding, in the default, block or
entity loot context; their codecs report missing fields as
DataFixerUpper does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 17:24:18 +02:00
Ludovic Marie 0a1ce1314c Merge branch 'parity-base' into parity/saves 2026-10-11 17:12:11 +02:00
Ludovic Marie 17b1bcf2ce Destroy blocks for /setblock and /fill destroy as Level.destroyBlock does
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 17:11:05 +02:00
Ludovic Marie debc6e124c Award tick, inventory and recipe advancements and draw block drops as vanilla
PlayerTrigger.TICK fires every tick and InventoryChangeTrigger as the
inventory changes; /recipe counts recipe book displays and fires
RecipeUnlockedTrigger; block drops draw from their loot table's random
sequence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 17:02:09 +02:00
Ludovic Marie ae3f129c8e Format the dispenser parity work
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:54:06 +02:00
Ludovic Marie 54a92f23f0 Give every block update oracle level a chunk generator
Bone meal and saplings reach for getChunkSource().getGenerator(); the
shared oracle level now answers it, as the dispenser oracle did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:52:18 +02:00
Ludovic Marie 753b5654b1 Keep errors inside forked execute chains silent, as vanilla
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:51:07 +02:00
Ludovic Marie a47f1ec58b Dispense mobs with their jockeys as vanilla's spawn eggs do
A dispensed spawn egg's mob gets the riders finalizeSpawn adds (chicken
jockeys, spider jockeys, strider jockeys). The harness leaves which mob
comes out a baby and rides to the spawning port's finalization draws, as
it already does for the level random of spawning cases. Cases no longer
grow plants out of a dispenser or build a door from mismatched halves,
and the oracle runs every case three times so an unseeded value is
marked even when two runs happen to agree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:50:20 +02:00
Ludovic Marie 00371a7f35 Run /test as vanilla does in a world without test instances
Model TestCommand's release tree (ResourceSelectorArgument patterns
included) and its finder, locate, pos, stop and clear outcomes when no
test instance block exists. Compare /help's gamerule alternatives as a
set: GameRuleCommand registers them in identity-hash order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:47:42 +02:00
Ludovic Marie 3ba0204bc0 Merge branch 'parity-base' into parity/blocks 2026-10-11 16:44:43 +02:00
Ludovic Marie 38059ab9f9 Merge branch 'parity-base' into parity/hud 2026-10-11 16:43:21 +02:00
Ludovic Marie d061bdf2fb Share harness passes between worktrees and cap harnesses machine-wide
A pass is keyed by the content of the harness's dependencies, so it is
also valid in any worktree with the same files. Passes are published to
parity-shared/ beside the shared vanilla data, and a worktree adopts one
whose key matches its own files instead of running the harness: an
agent's gate only runs what its own changes affect, instead of the whole
suite from scratch. Every runner on the machine also shares
PARITY_MACHINE_JOBS slots, so several agents' gates can't overload it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:42:52 +02:00
Ludovic Marie d7e4a5a275 List command usages in vanilla's registration order and run the release tree
Brigadier keeps children in registration order and /help prints them
that way; tools/generate_command_order.py records vanilla's order where
Horizon's tree differs. The game now runs the release integrated
server's tree; HORIZON_DEV_COMMANDS restores the development commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:41:43 +02:00
Ludovic Marie 877165a6c9 Read region headers as vanilla's RegionFile does in the region tests
Invalid allocations are dropped rather than refused, overlaps are not
checked, and an empty or truncated file is a region without chunks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:41:30 +02:00
Ludovic Marie 3a875c709e Refuse only worlds older than 1.18.2 when opening them
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:39:26 +02:00