Commit Graph

113 Commits

Author SHA1 Message Date
Ludovic Marie feeefb3a33 Mobs: a punch shows smooth and slow, as on vanilla's client
The server sends a knocked-back, pushed or jumping mob's move at once
(Entity.needsSync), and the remote client walks every living entity along
the server's positions with vanilla's SteppedInterpolationHandler: each
position takes the type's update interval to reach, sped up while steps
pile up. Before, the client waited for the next due update and then
lerped there in fewer ticks, so a hit pig jumped away fast.

tools/test_stepped_interpolation_parity.py drives vanilla's unmodified
InterpolationData and the Rust port with the same packets and ticks
(random cases and a punched pig's knockback); 135236 positions and
rotations match bit for bit.

Fixes #1374

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 05:38:46 +02:00
Ludovic Marie 9f385280ef Version facts in one generated file: crates/horizon-core/src/version.rs
tools/gen_version_consts.py writes what the pinned client jar's version.json
states (name, id, protocol, data version, pack formats, Java, stable, build
time) into horizon_core::version, and every Rust site reads it from there:
PROTOCOL_VERSION, GAME_VERSION, DATA_VERSION, the save's and the datafixer's
version name, /version, the crash report, the legacy ping, the dedicated
server's start line, the title screens, the default resource folder, the
resource pack format, and the launcher's and horizon-ctl's fallbacks. CI
checks the file against the pinned jar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:22:20 +02:00
Ludovic Marie 68092c4c7f WIP: unfinished saves parity work, stopped for the night
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-10 22:24:03 +02:00
Ludovic Marie 231dd0c851 Fill container loot tables like vanilla LootTable.fill
New horizon_world::loot: pools, weighted and nested entries, the item
modifiers chest tables use (counts, damage, random and level-based
enchanting, potions, stew effects, instruments, filtered/discard),
conditions, the stack splitter and the slot shuffle, all with vanilla's
random draw order. tools/compare_loot_fill.py runs a new vanilla oracle
(VanillaLootFillOracle) against the loot_fill example: all 58 chest
tables match slot for slot over 42 seeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:18:18 +02:00
Ludovic Marie f11931e1d3 Add level block-behaviour module: setBlock, neighbour/shape updates, fluids, redstone, ticks
Behaviours loads per-block class chains, instance configuration and per-state
support/signal/fluid facts exported by VanillaBlockBehaviourExporter, and ports
Level.setBlock with the CollectingNeighborUpdater, updateShape for every
overriding class, canSurvive, FlowingFluid spreading with lava/water
interactions, gravity blocks, rails, tripwires, redstone wire/torches/diodes,
scheduled ticks and random ticks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 01:22:03 +02:00
Ludovic Marie ecb3ebfd34 Account for accepted movement distance in resident player hunger 2026-10-07 17:29:13 +02:00
Ludovic Marie c109f91cc5 Connect resident client chunks to native-validated world collisions 2026-10-07 14:42:44 +02:00
Ludovic Marie f249a55f35 Synchronize registered effect particles, invisibility and glowing state 2026-10-07 14:19:54 +02:00
Ludovic Marie 4a2fcedbd3 Bind registered attribute refresh to native entity update consequences 2026-10-07 13:51:15 +02:00
Ludovic Marie 55846d2fc0 Bind entity effect notifications to concrete attribute maps and queues 2026-10-07 12:38:24 +02:00
Ludovic Marie 76b3bdc237 Bind effect modifiers to lazy attribute instances and native dirty queues 2026-10-07 12:23:28 +02:00
Ludovic Marie 6a33b0c148 Match effect attribute templates and permanent modifier callback ordering 2026-10-07 12:07:19 +02:00
Ludovic Marie 66aa81d8a1 Checkpoint object-map implementation before native parity validation 2026-10-07 11:48:04 +02:00
Ludovic Marie 636f1648f0 Bind attribute refresh to health limits and waypoint update ordering 2026-10-07 11:39:35 +02:00
Ludovic Marie a772a69498 Match effect eligibility and attribute/passenger notification ordering 2026-10-07 11:31:39 +02:00
Ludovic Marie f9d8277b73 Preserve fastutil attribute-set storage and live iterator behavior 2026-10-07 11:19:02 +02:00
Ludovic Marie 05cdc7573a Integrate entity effect ticking, expiration and client particles 2026-10-07 11:09:59 +02:00
Ludovic Marie 32c53db88a Bind consumable effects to shared entity status storage 2026-10-07 11:01:50 +02:00
Ludovic Marie 09f4c72dcb Match active status effect storage and lifecycle notifications 2026-10-07 10:56:23 +02:00
Ludovic Marie 9bb87815a1 Match random teleport consumable attempts and success effects 2026-10-07 10:23:21 +02:00
Ludovic Marie 63e687f610 Implement status and sound consume effects with native instance copies 2026-10-07 10:16:26 +02:00
Ludovic Marie 31261290a6 Add shared status effect instances and native hidden-chain updates 2026-10-07 10:08:55 +02:00
Ludovic Marie 9c14d22bc9 Compose consumable timing and sounds with native eating particles 2026-10-07 09:53:21 +02:00
Ludovic Marie faaa25cd1b Match eating particle snapshots and native random draw ordering 2026-10-07 09:49:49 +02:00
Ludovic Marie 7b915f8689 Implement food consumption listener with native sound and hunger ordering 2026-10-07 09:42:53 +02:00
Ludovic Marie fda79cc3db Deliver consumed item remainders through player inventory pickup 2026-10-07 09:31:23 +02:00
Ludovic Marie 0c85e0f5c2 Compose item completion with validated remainders and cooldowns 2026-10-07 09:25:56 +02:00
Ludovic Marie af42edd017 Implement item cooldown storage, expiry callbacks and use application 2026-10-07 09:17:20 +02:00
Ludovic Marie 118e93ea51 Preserve native hash-map order for simulation callback storage 2026-10-07 09:09:41 +02:00
Ludovic Marie 12b61234b1 Implement checked bundle weights and contained item validation 2026-10-07 08:59:07 +02:00
Ludovic Marie e6d39183b5 Preserve native item remainder conversion and shared stack identity 2026-10-07 08:53:10 +02:00
Ludovic Marie 0a582b56d6 Implement item templates and strict scalar stack validation 2026-10-07 08:50:15 +02:00
Ludovic Marie f367641aa7 Bind item-use lifecycle to player inventory and synchronized flags 2026-10-07 08:25:27 +02:00
Ludovic Marie fb57fc5ee7 Back living item-use flags with synchronized byte storage 2026-10-07 08:15:15 +02:00
Ludovic Marie 5f8c41aaad Bind player hand access to selected inventory and shared equipment 2026-10-07 08:03:42 +02:00
Ludovic Marie a3cecfdead Compose native inventory and equipment ticks with shared stack state 2026-10-07 07:59:07 +02:00
Ludovic Marie 843cabc038 Compose inventory pickup with shared stacks and creative fallback 2026-10-07 07:54:29 +02:00
Ludovic Marie 6f3d124f70 Implement player inventory storage and shared equipment selection 2026-10-07 07:47:32 +02:00
Ludovic Marie 202dad8192 Add shared item references and native container transfer behavior 2026-10-07 07:41:29 +02:00
Ludovic Marie cda5895cab Implement item stack storage, copy identity and consumption semantics 2026-10-07 07:30:19 +02:00
Ludovic Marie dd02942c90 Bind durability algorithms directly to component patch storage 2026-10-07 07:16:41 +02:00
Ludovic Marie c37a622f9c Implement shared component prototypes and ordered copy-on-write patches 2026-10-07 07:06:29 +02:00
Ludovic Marie 5d8ad5fc3a Bind registered item defaults to use and durability behavior 2026-10-07 06:58:53 +02:00
Ludovic Marie c45d0c7965 Match item-use start equipment synchronization and flag ordering 2026-10-07 06:42:53 +02:00
Ludovic Marie 9b15ab46d0 Implement living item-use tick release and completion lifecycle 2026-10-07 06:35:37 +02:00
Ludovic Marie 3e60a149e3 Bind blocking-item damage to native-compatible durability storage 2026-10-07 06:29:06 +02:00
Ludovic Marie 2f432d7cc9 Implement stored item durability and native break ordering 2026-10-07 06:25:12 +02:00
Ludovic Marie 6f01a1426e Match blocking-item eligibility and elapsed item-use timers 2026-10-07 06:20:34 +02:00
Ludovic Marie a980b89b33 Implement living item-blocking direction and dispatch ordering 2026-10-07 06:12:53 +02:00
Ludovic Marie 5563c8708a Match native view vectors and blocking-angle inverse cosine 2026-10-07 06:07:40 +02:00