Commit Graph

759 Commits

Author SHA1 Message Date
Ludovic Marie e4bb8463b9 Show the player list and the world border wall in the game
Holding the player-list key draws tab_list's layout: in single player the
local player with the list objective (vanilla shows nothing otherwise), on
a server the listed players from PlayerInfoUpdate (game mode, latency,
display name, list order, hat), the tab list header and footer, online
mode for heads and the server's objectives, scores, display slots and
teams, which now also feed the sidebar. The renderer draws the border wall
with RenderPipelines.WORLD_BORDER's overlay blend and the forcefield
texture, from border_render's buffer and transforms; the client border
follows the server's border packets and ticks between them. The vignette
reddens near the border.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:07:47 +02:00
Ludovic Marie 8a32850f95 Lay out the player list exactly as vanilla PlayerTabOverlay does
tab_list ports PlayerTabOverlay: the comparator (list order, spectators,
team, name ignoring case), the 80-player limit and 20-row columns, heads
with the default skin by UUID and upside-down names, team and spectator
name styling, ping bars, the list objective as integer scores in their
number format or hearts with their change blink and the hp text fallback,
and the wrapped header and footer. Font::split_lines now follows
StringSplitter.splitLines and Text::resolve_legacy applies legacy codes
inside components. test_tab_list_parity runs vanilla's overlay against
examples/tab_list_fixture: 1,000 cases, 3,476 frames, 844,758 calls match.

The protocol gains the scoreboard, team and world border packets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:47:55 +02:00
Ludovic Marie 3467380074 Render the world border wall and its vignette exactly as vanilla does
The client border now wraps horizon-core's vanilla-checked BorderGeometry
(previous size for partial ticks, status, lerp speed, absolute limit) and
border_render ports WorldBorderRenderer: extract's fade and tint, the cached
wall buffer, the scrolling texture transform and which walls draw. The
vignette takes vanilla's int colour and the warning strength from the
border. test_world_border_render_parity runs vanilla's renderer against
examples/world_border_render_fixture: 1,500 cases, 16,859 frames match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:29:53 +02:00
Ludovic Marie fd79addba4 Merge branch 'parity/saves' into parity-base 2026-10-12 14:06:53 +02:00
Ludovic Marie 7f8bec70bc Merge branch 'parity/blocks' into parity-base 2026-10-12 14:06:53 +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 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 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 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 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 6ed726e935 Merge branch 'parity-base' into parity/loot-spawn 2026-10-11 17:26:12 +02:00
Ludovic Marie 0a1ce1314c Merge branch 'parity-base' into parity/saves 2026-10-11 17:12:11 +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 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 3ba0204bc0 Merge branch 'parity-base' into parity/blocks 2026-10-11 16:44:43 +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 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
Ludovic Marie 6605e6cdf1 Run the dispenser fixture in the oracle's plains light and level
The fixture's chunks are plains (empty chunks read as badlands, which has
no bone meal flowers) and carry the case's sky and block light, as the
oracle level does, so grass bone meal places flowers and crops check
their light like vanilla's. The oracle's client sounds include the lava
fizz (1501). Cases build two-block plants whole: a lone lower half is not
a world vanilla makes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:32:28 +02:00
Ludovic Marie 93b785a2ef Describe save upgrades from 1.18.2 in the status table
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:28:53 +02:00
Ludovic Marie 7994c1e8c5 Count natural spawning among the entity checks that match vanilla
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:19:49 +02:00
Ludovic Marie 6949ca4455 Target rarer natural spawns in the parity harness
Desert, snowy, swamp and jungle nights, lush, sulfur and dripstone caves,
warm and frozen oceans, crimson forests and slime chunks. A cube mob grown
by finalizeSpawn takes its constructor's head rotation from the entity's
unseeded random (AbstractCubeMob.onSyncedDataUpdated), so that yaw alone is
not compared.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:14:22 +02:00
Ludovic Marie 36209e7827 Place dispensed shulker boxes only where DirectionalPlaceContext can
A dispenser places a shulker box in the block in front or nowhere, and
only when that block's canBeReplaced accepts it (a snow layer only when
it is a single layer).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:10:30 +02:00
Ludovic Marie b2812c55be Choose natural spawns exactly as vanilla's NaturalSpawner does
tools/test_natural_spawn_parity.py compares whole chunk spawn passes,
spawnCategoryForPosition from chosen sites and chunk generation packs
against vanilla's NaturalSpawner on generated box worlds.

Divergences fixed on the way: the reduced water ambient tag is
reduce_water_ambient_spawns, and the room check uses each type's spawn
dimensions scale (4 for slimes and magma cubes, 2 for sulfur cubes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:10:12 +02:00
Ludovic Marie e1eabdc781 Pass the save upgrade harness from 1.18.2: block entity data stays empty
A block entity read inside an item stack remembers the map it was read from;
that memory is not part of the value, so an item's block entity tag with
only its id still counts as empty and is dropped, as in vanilla.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:07:10 +02:00
Ludovic Marie 8eca39aff1 Equip, saddle and light from dispensers as vanilla does
Villagers, piglins, piglin brutes, allays, dolphins, foxes and pandas can
pick up loot from construction (their constructors call
setCanPickUpLoot), so they take dispensed equipment without spawn
finalization. Nautilus saddles play item.nautilus_saddle_equip. The
oracle level is the overworld, so fire in an obsidian frame lights a
portal there too, and it answers getEntity(id) and level-wide entity
queries, which leash cutting needs. Unseeded item motion is compared
within its full spread (item motion plus a shearing sheep's push).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:07:06 +02:00
Ludovic Marie bcfa2f6974 Retry fresh only when a harness that passed fails while reusing oracle results
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:56:45 +02:00
Ludovic Marie 0de0379cc7 Expect an int page in the click event fix test, as createInt writes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:53:55 +02:00
Ludovic Marie 894113d7f4 Build golems and withers from dispensers as vanilla does
Golems and the wither come from EntityType.create (no spawn finalization,
no level random), after clearPatternBlocks sets every pattern cell to air
with flags 2 and a destroy event, and updatePatternBlocks follows. A
dispensed pumpkin that completes a golem skips setBlock's neighbour
updates as vanilla's does, and pumpkins and skulls post block_place.
Dispensed skulls face RotationSegment.convertToSegment(facing). Destroy
events for air play no break sound. The dispenser fixture plays on normal
difficulty like the oracle level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:53:37 +02:00
Ludovic Marie a598255898 Add the natural spawn oracle and fixture
VanillaNaturalSpawnOracle runs NaturalSpawner (createState, the filtered
categories, spawnForChunk's loop, spawnCategoryForPosition and
spawnMobsForChunkGeneration) on a stand-in level built from boxes of blocks,
light and biomes with structure pieces, entities, players, the world spawn
and unloaded chunks; natural_spawn_fixture runs mobs::spawn_selection on the
same world.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:52:12 +02:00
Ludovic Marie 139c5abd1c Port the DataFixers of 1.19 to 1.20 for worlds from 1.18.2 on
The fixes from 3076 to 3459 (game event, cat, frog, painting, goat, goat
horn, filtered text, POI, blending, spawn egg, effect duration, archaeology,
double-sided signs, the 1.20 experiment and chunk statuses), the block
entities their schemas add, and block entities' remainders (a decorated
pot's shards stay next to its sherds). The sample world generator logs in
to 1.18.2 to 1.19.4 servers and gates the scene by version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:50:56 +02:00
Ludovic Marie 1b4c3dec6b Merge branch 'parity-base' into parity/blocks 2026-10-11 15:44:08 +02:00
Ludovic Marie 3ab461cffc Upgrade older worlds when Horizon opens them, as 26.3 does
Opening a world saved by an older version runs the file fixes, level.dat and
the DataFixers upgrades of every file instead of refusing it. The save
round-trip harness treats a lit campfire's cooking progress as a timer in the
vanilla views: Horizon saves it as loaded (stage 3 checks it exactly), and it
moves on by however many ticks each vanilla server ran before data get.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:44:02 +02:00
Ludovic Marie 484bbb5ee8 Merge branch 'parity-base' into parity/loot-spawn 2026-10-11 15:43:57 +02:00
Ludovic Marie e019d361d9 WIP: natural spawn oracle and collision lookup (harness in progress)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:43:57 +02:00
Ludovic Marie ef6499fb0e Merge branch 'parity-base' into parity/saves 2026-10-11 15:43:49 +02:00
Ludovic Marie 13759ef16b Reuse unchanged vanilla oracle runs, and keep test games silent
tools/parity_shim.py stands in for java and javac in harness runs: it
records each oracle run's outputs and the content of every file under the
paths its arguments name, and replays the run while those are unchanged.
After a Rust-only change a harness only pays for its Rust side
(block_update 53 s -> 5 s). A harness that fails while reusing oracle
results is rerun fresh, and stops reusing them if that passes; --all and
--fresh never reuse them.

Harness probes built in the dev profile are optimised (overflow checks
and debug assertions kept), and the chunk generation harness runs its
vanilla and Horizon sides concurrently.

HORIZON_NO_AUDIO keeps the game off the speakers; tools/parity.py sets it,
since the save round-trip harness launches the game on a virtual screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:43:26 +02:00
Ludovic Marie c626f696f5 Set dispensed mobs down as EntityType.getYOffset does
Only the collision shapes overlapping the spawn block stop the fall, so a
wide mob beside the dispenser no longer lands a block high. Spawn egg
cases compare that the new mob speaks and where, not which of its voices
its own unseeded random picked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:41:00 +02:00
Ludovic Marie 49ecc8a7c3 Keep the fields DataFixerUpper's remainders bring back when upgrading saves
DataFixerUpper reads typed fields without taking them out of a record's
remainder, so a typed field a fix drops comes back on write with its value
from the record's last read: entities keep their old ArmorItems, HandItems,
body_armor_item, saddle, Trident and Particle next to the new fields, as
vanilla 26.3 writes them. Fixes that write and read entities refresh that
map. The area effect cloud particle moves to custom_particle (4420), boats
keep Type (BoatSplitFix's remainder update misses), and region files with a
short header read as empty, as vanilla's RegionFile does. The sample worlds
now use the item formats each version accepts and enable its experiments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:40:30 +02:00
Ludovic Marie a21d268a41 Spawn naturally through a NaturalSpawner port shared by the game
mobs::spawn_selection ports NaturalSpawner over a NaturalLevel trait: the
spawn state (category counts, spawn potential charges, local caps), the
filtered categories, spawnForChunk, spawnCategoryForPosition with mobsAt,
isValidSpawnPostitionForType and isValidPositionForMob, and
spawnMobsForChunkGeneration. The game's spawning goes through it. Biomes
now load their spawn costs and creature_world_gen_spawn_probability.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:40:15 +02:00
Ludovic Marie f9fcb004a5 Dispense chest boats and command block minecarts as vanilla does
BoatDispenseItemBehavior spawns the chest boat or chest raft itself: boats
now carry ChestBoat's 27-slot chest, drawn with its model, saved with its
Items, opened by sneaking, spilt when broken. MinecartDispenseItemBehavior
spawns command block minecarts (an empty command). The dispenser harness
now draws fronts per item (fire, portal frames, anchors, crops, copper,
hives, golem and wither builds), every boat wood, more equipment, spawn
eggs, sulfur cube swallowables and leashed targets, over 6000 cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:38:13 +02:00
Ludovic Marie a5aaa53ab7 Light fires, portals, candles and anchors from dispensers as vanilla does
Flint and steel uses BaseFireBlock.canBePlacedAt and getState (a portal
frame draws the level random for vertical dispensers), posts block_place
and block_change, and lights only what CampfireBlock, CandleBlock and
CandleCakeBlock.canLight accept. Fire placed inside an empty obsidian
frame now lights the portal (BaseFireBlock.onPlace). Glowstone posts the
anchor's block_change. Shears cut leads (shearOffAllLeashConnections) and
empty a sulfur cube. Dropped leads draw motion from the item's own
random, not the level's. The oracle gives bone meal a chunk generator so
sapling, grass and moss cases are compared instead of erroring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:31:35 +02:00
Ludovic Marie 888ce5a3ff Merge branch 'parity-base' into parity/loot-spawn 2026-10-11 15:27:03 +02:00
Ludovic Marie c9a1e959ee Merge branch 'parity-base' into parity/saves 2026-10-11 15:26:57 +02:00
Ludovic Marie 51b6b0b65e Merge branch 'parity-base' into parity/blocks 2026-10-11 15:26:48 +02:00