[PR #4626] [MERGED] Send beacon, end gateway and creaking heart update tags #5735

Closed
opened 2026-11-03 05:14:39 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4626
Author: @AurelienBelloir
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @rdbtCVS

Base: main ← Head: parity/block-entity-updates


📝 Commits (2)

  • 0c9ac0c Send beacon, end gateway and creaking heart update tags
  • c1db3ba Leave ExactTeleport out of an end gateway's update tag when unset

📊 Changes

1 file changed (+107 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/lan/chunks.rs (+107 -0)

📄 Description

🤖 Opened by AurelienBelloir's AI agent (Claude Code, Claude Opus 5.5), not by AurelienBelloir personally.

What and why

  • In vanilla, BeaconBlockEntity, TheEndGatewayBlockEntity and CreakingHeartBlockEntity override getUpdatePacket, and their getUpdateTag is saveCustomOnly. Their data therefore goes into the chunk packet (BlockEntityInfo.create) and into the BlockEntityData that ChunkHolder.broadcastBlockEntityIfNeeded sends after sendBlockUpdated or /data merge block.
  • The LAN host's lan::chunks::entity_tag returned None for these three, so guests never received them. For example, an end gateway's Age, which drives its spawning beam, and a beacon's effects never reached them.
  • entity_tag now builds their saveAdditional fields: primary_effect, secondary_effect and Levels for the beacon; Age, exit_portal and ExactTeleport (only when set, as saveAdditional does) for the end gateway; the creaking UUID for the creaking heart.
  • The rest of the #3520 row was already done. The host's block log is its sendBlockUpdated, and hub.rs broadcast_block_changes already sends BlockEntityData for sign edits, sign dye/ink/wax, shelves, campfires, vaults, spawners, trial spawners, decorated pots and /data. Chests, lecterns, jukeboxes, beehives and command blocks have no getUpdatePacket in vanilla, so nothing is sent for them, which is correct.
  • Added a unit test that round-trips each new update tag through the client's decode_block_entity.

Fixes #4625

Not covered: The Beacon update tag has no CustomName or lock, because Horizon's Beacon struct does not store them. Conduit, CopperGolemStatue, Jigsaw, Structure, Test and TestInstance have no BlockEntity variant in Horizon, so they get no update tag; in vanilla the conduit's sendBlockUpdated on a target change sends its Target UUID. Not checked in depth: whether SpawnEggItem.useOn on a spawner or trial spawner, as handled by the host, goes through spawner_block_updated or mark_block_entity_updated.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Read from the 26.3 bytecode with javap -c:

  • BlockEntity.getUpdatePacket (overrides: Banner, Beacon, Brushable, Campfire, Conduit, CopperGolemStatue, CreakingHeart, DecoratedPot, Jigsaw, Shelf, Sign, Skull, Spawner, Structure, Test, TestInstance, TheEndGateway, TrialSpawner, Vault)
  • BeaconBlockEntity.getUpdateTag / saveAdditional / loadAdditional
  • TheEndGatewayBlockEntity.getUpdateTag / saveAdditional / loadAdditional
  • CreakingHeartBlockEntity.getUpdateTag / saveAdditional
  • SignBlockEntity.markUpdated / setWaxed / setText / updateSignText
  • ShelfBlockEntity.setChanged
  • CampfireBlockEntity.markUpdated / cookTick
  • ConduitBlockEntity.updateAndAttackTarget
  • TrialSpawnerBlockEntity.markUpdated
  • VaultBlockEntity$Server.tick
  • SpawnerBlockEntity$1.setNextSpawnData
  • SpawnEggItem.useOn
  • BlockDataAccessor.setData
  • CommandBlockEntity$1.onUpdated
  • ClientboundLevelChunkPacketData$BlockEntityInfo.create

Tests added or extended:

  • lan::chunks::tests::beacon_gateway_and_heart_update_tags_load_on_the_client

No new parity harness.

Self-check

The full tools/pr_ready.py needs more disk than this machine has (see #4543). Checked by hand on Windows, with prepared 26.3 resources in HORIZON_RESOURCES (CARGO_INCREMENTAL=0):

  • rustfmt: ✅
  • cargo clippy -p horizon-client --all-targets -- -D warnings: ✅
  • cargo test --no-fail-fast -p horizon-client --lib --bins --tests: horizon-client lib 781 passed, 1 failed: title::tests::each_world_preset_writes_its_own_generator, which fails on Windows only and already fails on main; #4544 fixes it; horizon-client bin 240 passed; horizon-ctl 18 passed; all 8 integration suites pass
  • Public tree hook: ✅
  • An independent review against the 26.3 bytecode before opening; its findings are fixed in this branch.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/4626 **Author:** [@AurelienBelloir](https://github.com/AurelienBelloir) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `parity/block-entity-updates` --- ### 📝 Commits (2) - [`0c9ac0c`](https://github.com/horizon-rust/horizon/commit/0c9ac0cfae3a1f990e540ac722efa86678dc73d0) Send beacon, end gateway and creaking heart update tags - [`c1db3ba`](https://github.com/horizon-rust/horizon/commit/c1db3bad48d6086eab2523c9950854f98c4a8f71) Leave ExactTeleport out of an end gateway's update tag when unset ### 📊 Changes **1 file changed** (+107 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/lan/chunks.rs` (+107 -0) </details> ### 📄 Description > 🤖 Opened by AurelienBelloir's AI agent (Claude Code, Claude Opus 5.5), not by AurelienBelloir personally. ## What and why - In vanilla, BeaconBlockEntity, TheEndGatewayBlockEntity and CreakingHeartBlockEntity override getUpdatePacket, and their getUpdateTag is saveCustomOnly. Their data therefore goes into the chunk packet (BlockEntityInfo.create) and into the BlockEntityData that ChunkHolder.broadcastBlockEntityIfNeeded sends after sendBlockUpdated or /data merge block. - The LAN host's `lan::chunks::entity_tag` returned None for these three, so guests never received them. For example, an end gateway's Age, which drives its spawning beam, and a beacon's effects never reached them. - `entity_tag` now builds their saveAdditional fields: `primary_effect`, `secondary_effect` and `Levels` for the beacon; `Age`, `exit_portal` and `ExactTeleport` (only when set, as `saveAdditional` does) for the end gateway; the `creaking` UUID for the creaking heart. - The rest of the #3520 row was already done. The host's block log is its sendBlockUpdated, and `hub.rs` broadcast_block_changes already sends BlockEntityData for sign edits, sign dye/ink/wax, shelves, campfires, vaults, spawners, trial spawners, decorated pots and /data. Chests, lecterns, jukeboxes, beehives and command blocks have no getUpdatePacket in vanilla, so nothing is sent for them, which is correct. - Added a unit test that round-trips each new update tag through the client's `decode_block_entity`. Fixes #4625 Not covered: The Beacon update tag has no CustomName or lock, because Horizon's Beacon struct does not store them. Conduit, CopperGolemStatue, Jigsaw, Structure, Test and TestInstance have no BlockEntity variant in Horizon, so they get no update tag; in vanilla the conduit's sendBlockUpdated on a target change sends its Target UUID. Not checked in depth: whether SpawnEggItem.useOn on a spawner or trial spawner, as handled by the host, goes through spawner_block_updated or mark_block_entity_updated. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference Read from the 26.3 bytecode with `javap -c`: - `BlockEntity.getUpdatePacket (overrides: Banner, Beacon, Brushable, Campfire, Conduit, CopperGolemStatue, CreakingHeart, DecoratedPot, Jigsaw, Shelf, Sign, Skull, Spawner, Structure, Test, TestInstance, TheEndGateway, TrialSpawner, Vault)` - `BeaconBlockEntity.getUpdateTag / saveAdditional / loadAdditional` - `TheEndGatewayBlockEntity.getUpdateTag / saveAdditional / loadAdditional` - `CreakingHeartBlockEntity.getUpdateTag / saveAdditional` - `SignBlockEntity.markUpdated / setWaxed / setText / updateSignText` - `ShelfBlockEntity.setChanged` - `CampfireBlockEntity.markUpdated / cookTick` - `ConduitBlockEntity.updateAndAttackTarget` - `TrialSpawnerBlockEntity.markUpdated` - `VaultBlockEntity$Server.tick` - `SpawnerBlockEntity$1.setNextSpawnData` - `SpawnEggItem.useOn` - `BlockDataAccessor.setData` - `CommandBlockEntity$1.onUpdated` - `ClientboundLevelChunkPacketData$BlockEntityInfo.create` Tests added or extended: - `lan::chunks::tests::beacon_gateway_and_heart_update_tags_load_on_the_client` No new parity harness. ## Self-check The full `tools/pr_ready.py` needs more disk than this machine has (see #4543). Checked by hand on Windows, with prepared 26.3 resources in `HORIZON_RESOURCES` (`CARGO_INCREMENTAL=0`): - rustfmt: ✅ - `cargo clippy -p horizon-client --all-targets -- -D warnings`: ✅ - `cargo test --no-fail-fast -p horizon-client --lib --bins --tests`: horizon-client lib 781 passed, 1 failed: `title::tests::each_world_preset_writes_its_own_generator`, which fails on Windows only and already fails on main; #4544 fixes it; horizon-client bin 240 passed; horizon-ctl 18 passed; all 8 integration suites pass - Public tree hook: ✅ - An independent review against the 26.3 bytecode before opening; its findings are fixed in this branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:14:39 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5735
No description provided.