Commit Graph

4750 Commits

Author SHA1 Message Date
Ludovic Marie 8490e19ec0 Resolve nbt text components, other dimensions and vanilla's own data as vanilla
/tellraw resolves nbt components; execute in another dimension sees its
chunks unloaded; the built-in pack's predicates load; holders stay
tracked after their objective is removed; new worlds use the offline
profile id of the player.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:34:17 +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 2faf5520b3 Match vanilla /spreadplayers, /datapack, /reload, function tags and dialog codecs
/spreadplayers follows SpreadPlayersCommand (safe positions, failure
distance, float centre); /datapack models the built-in, feature and
world packs with their chat links; unknown function tags are empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:22:06 +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 b5d84b138d Match vanilla /clear predicates, /particle results, block entity NBT and /fillbiome checks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:06:17 +02:00
Ludovic Marie c80edcdbf4 Draw /loot from each table's random sequence, as vanilla
LootTable.getRandomItems uses the table's random_sequence, so /loot
results are deterministic per world seed; inline loot tables and tool
components now work too. The oracle ticks its player like the network
listener does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:59:56 +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 2ea1c273dd Run /item modify, /summon stacks and generic attributes as vanilla
Inline and registered item modifiers now apply (26.3's type-dispatched
functions, set_lore, set_custom_data, set_components, toggle_tooltips,
filtered), counting every set slot like CountingModifier. Item stacks
keep components Horizon does not model, display names follow
ItemStack.getDisplayName, /data prints compounds in CompoundTag's
HashMap order, summoned passengers snap to the position, and living
entities other than the player get vanilla attribute maps (waypoint
transmit range included, tracked as ServerWaypointManager does).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:52:59 +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 c2b7dad0e4 Merge branch 'parity-base' into parity/hud 2026-10-11 15:43:47 +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 01f492c939 Select, tag and summon entities Horizon does not simulate, as vanilla
Markers, displays and other unsimulated entity types are now kept as
their saved data at a position, so selectors, /tag, /kill, /tp and
/data reach them. Widen the command execution corpus to every command
the integrated server registers, and keep the oracle's terrain tickets
out of /forceload's view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:31:12 +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 89b712b5a8 Merge branch 'parity-base' into parity/hud 2026-10-11 15:26:52 +02:00
Ludovic Marie 51b6b0b65e Merge branch 'parity-base' into parity/blocks 2026-10-11 15:26:48 +02:00
Ludovic Marie abee1f165b Let the gate pass with harnesses that already fail on the integration branch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:05:57 +02:00
Ludovic Marie 6396e8c161 Run the vanilla harnesses in parallel, only when their inputs change
tools/parity.py traces each harness (its Python, Java oracle sources and
the Rust sources of the probes it runs, from Cargo's dep-info) and reruns
it only when one of those, the vanilla artifacts or the toolchains change.
Harnesses run in parallel within the available memory, and their probes
build without LTO and with 16 codegen units into .local/parity-target: a
one-line change rebuilds every horizon-world probe in 3 seconds instead of
122. The full suite takes about 20 minutes instead of an hour.

tools/gate.py is the check a branch passes before integration, and
tools/supervise.py manages the per-area worktrees: status, new worktrees,
saving unfinished work, and integrating a branch only when the gate passes.

Harnesses find probes through lab.cargo_target() instead of a hard-coded
target/, the save round-trip harness builds the binaries it launches, and
the mob AI harness now fails on divergences like every other harness
(--report-only keeps the old behaviour). Debug builds keep line tables
only, so worktrees stay small.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:05:36 +02:00
Ludovic Marie bf3de4ef05 WIP: saves parity work, paused while the harness tooling is sped up
Uncommitted changes the agent had in progress when it was stopped; may
not build or pass its harnesses yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 14:26:49 +02:00
Ludovic Marie e3a1cdce51 WIP: hud parity work, paused while the harness tooling is sped up
Uncommitted changes the agent had in progress when it was stopped; may
not build or pass its harnesses yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 14:26:47 +02:00
Ludovic Marie 45cb5850a9 WIP: blocks parity work, paused while the harness tooling is sped up
Uncommitted changes the agent had in progress when it was stopped; may
not build or pass its harnesses yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 14:26:46 +02:00
Ludovic Marie 504c4df027 Merge branch 'parity-base' into parity/loot-spawn
# Conflicts:
#	crates/horizon-client/src/mobs.rs
2026-10-11 14:17:15 +02:00
Ludovic Marie 45b8861a85 Accept vanilla's clockless time sync in the LAN bot test
MinecraftServer.forceGameTimeSynchronization broadcasts SetTime with no
clocks every 20 ticks, and it can reach a joining bot before
PlayerList.sendLevelInfo's full sync. Wait for a sync with clocks instead
of failing on the first packet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 14:16:34 +02:00
Ludovic Marie 6391ef0444 Merge branch 'parity-base' into parity/blocks
# Conflicts:
#	crates/horizon-client/src/mobs.rs
2026-10-11 14:16:18 +02:00
Ludovic Marie e6e7de7ebe Merge branch 'parity-base' into parity/saves 2026-10-11 14:12:55 +02:00
Ludovic Marie 4becbd860b Merge branch 'parity-base' into parity/hud 2026-10-11 14:12:44 +02:00
Ludovic Marie 6734879ff7 Pass rustfmt and clippy after merging the parity branches
Formats the overnight parity work, fixes the lints it introduced, and
updates the LAN bot test and mob AI probe for fields added on the other
side of the merges (the bot test also set a field that never existed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 14:11:51 +02:00
Ludovic Marie 6421e48c8f Merge commit 'a903cb4' into parity-base 2026-10-11 14:09:10 +02:00
Ludovic Marie 46e54c642f Merge commit 'e6ef8c5' into parity-base 2026-10-11 14:09:10 +02:00
Ludovic Marie 05bcc61446 Merge branch 'parity/multiplayer' into parity-base 2026-10-11 14:09:10 +02:00
Ludovic Marie c47a853e49 Merge branch 'parity/entity-ai' into parity-base 2026-10-11 14:09:10 +02:00