[PR #2952] [MERGED] Send banner, vault, trial spawner and decorated pot data to LAN guests #4707

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2952
Author: @kacpherek
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: fix/lan-block-entity-data


📝 Commits (4)

  • 2f7edd1 Send banner patterns to LAN guests
  • 203fb2d Send the vault display item to LAN guests
  • 2ad7b68 Send the trial spawner mob to LAN guests
  • 1deb3bd Send decorated pot sherds to LAN guests

📊 Changes

4 files changed (+82 additions, -4 deletions)

View changed files

📝 crates/horizon-client/src/game/decorated_pot.rs (+2 -0)
📝 crates/horizon-client/src/game/remote.rs (+33 -1)
📝 crates/horizon-client/src/lan/chunks.rs (+39 -0)
📝 crates/horizon-client/src/lan/hub.rs (+8 -3)

📄 Description

What and why

LAN guests (and the single-player window, which is a guest of its own server thread) never received the data these block entities show, so the renderer drew defaults:

  • Banners showed no pattern layers.
  • Vaults never showed their display item.
  • Trial spawners never showed their mob.
  • Decorated pots showed no sherds.

Changes:

  • Banners send their patterns, custom name and components, as the update tag does.
  • Vaults send their shared data, which holds the display item.
  • Trial spawners send their spawn data, which the mob is drawn from.
  • Decorated pots send their sherds and item from the saved tag. A pot is not a block entity in Horizon, so the hub and the chunk encoder now read the saved tag for it. Placing or inserting into a pot marks it for update.
  • On the client, a pot update is stored with the chunk, where the renderer reads it. A vault or trial spawner update keeps the turn the client has already built up, since the tag does not carry it.
  • Trial spawners leave out next_mob_spawns_at: the Horizon client never reads it, and the value depends on the block state, which the encoder does not have.
  • Not done: moving pistons are still sent to guests as a plain piston (lan/chunks.rs, moving_piston). Fixing that needs the moved block, facing and progress on the wire and a client path that reuses moving_piston_geometry, which is a separate change. Open PR #2860 also touches how block entity data is sent.

Vanilla reference

  • Banner: BannerBlockEntity.java:65-70 (getUpdateTag = saveWithoutMetadata), :45-56 (patterns, CustomName)
  • Vault: vault/VaultBlockEntity.java:54-59 (shared_data)
  • Trial spawner: TrialSpawnerBlockEntity.java:53-59; trialspawner/TrialSpawnerStateData.java:255-263 (spawn_data, next_mob_spawns_at when ACTIVE)
  • Decorated pot: DecoratedPotBlockEntity.java:66-71 (getUpdateTag = saveCustomOnly), :44-53 (sherds, loot table or item)

Self-check

clippy and fmt pass for horizon-client. Not run in game.


🔄 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/2952 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/lan-block-entity-data` --- ### 📝 Commits (4) - [`2f7edd1`](https://github.com/horizon-rust/horizon/commit/2f7edd15247cd5f0c5904ec87edff15ab71dc77c) Send banner patterns to LAN guests - [`203fb2d`](https://github.com/horizon-rust/horizon/commit/203fb2db894645d448e140e08847e1043a160002) Send the vault display item to LAN guests - [`2ad7b68`](https://github.com/horizon-rust/horizon/commit/2ad7b687108c24a0b953fcf4d11274f2f4f2de0a) Send the trial spawner mob to LAN guests - [`1deb3bd`](https://github.com/horizon-rust/horizon/commit/1deb3bd36c105ab7a3c2dbd7e36c5c2b44c24ae9) Send decorated pot sherds to LAN guests ### 📊 Changes **4 files changed** (+82 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/decorated_pot.rs` (+2 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+33 -1) 📝 `crates/horizon-client/src/lan/chunks.rs` (+39 -0) 📝 `crates/horizon-client/src/lan/hub.rs` (+8 -3) </details> ### 📄 Description ## What and why LAN guests (and the single-player window, which is a guest of its own server thread) never received the data these block entities show, so the renderer drew defaults: - Banners showed no pattern layers. - Vaults never showed their display item. - Trial spawners never showed their mob. - Decorated pots showed no sherds. Changes: - Banners send their patterns, custom name and components, as the update tag does. - Vaults send their shared data, which holds the display item. - Trial spawners send their spawn data, which the mob is drawn from. - Decorated pots send their sherds and item from the saved tag. A pot is not a block entity in Horizon, so the hub and the chunk encoder now read the saved tag for it. Placing or inserting into a pot marks it for update. - On the client, a pot update is stored with the chunk, where the renderer reads it. A vault or trial spawner update keeps the turn the client has already built up, since the tag does not carry it. - Trial spawners leave out `next_mob_spawns_at`: the Horizon client never reads it, and the value depends on the block state, which the encoder does not have. - Not done: moving pistons are still sent to guests as a plain piston (`lan/chunks.rs`, `moving_piston`). Fixing that needs the moved block, facing and progress on the wire and a client path that reuses `moving_piston_geometry`, which is a separate change. Open PR #2860 also touches how block entity data is sent. ## Vanilla reference - Banner: `BannerBlockEntity.java:65-70` (getUpdateTag = saveWithoutMetadata), `:45-56` (patterns, CustomName) - Vault: `vault/VaultBlockEntity.java:54-59` (shared_data) - Trial spawner: `TrialSpawnerBlockEntity.java:53-59`; `trialspawner/TrialSpawnerStateData.java:255-263` (spawn_data, next_mob_spawns_at when ACTIVE) - Decorated pot: `DecoratedPotBlockEntity.java:66-71` (getUpdateTag = saveCustomOnly), `:44-53` (sherds, loot table or item) ## Self-check clippy and fmt pass for horizon-client. Not run in game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:21 +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#4707
No description provided.