[PR #1228] [MERGED] fix(protocol): decode particle entity-data serializers so server holograms render #3436

Closed
opened 2026-11-03 04:09:31 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1228
Author: @ItsPotatoTime
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @ludovic111

Base: main ← Head: fix/entity-metadata


📝 Commits (8)

  • 3993820 fix(client): show server players' and NPCs' skins
  • a5e0645 fix(client): draw armor stand custom names as name tags
  • c139387 fix(client): read server map art and item profiles
  • d013278 fix(client): hide marker stands and read server entity names
  • a20ebde fix(client): carry every server item component into tooltips
  • 9f6d781 fix(client): read empty-root component names through their extra spans
  • ad676af fix(protocol): decode particle entity-data serializers so later slots survive
  • 5b44452 fix(protocol): read PARTICLES as a list; keep every particle's data

📊 Changes

23 files changed (+998 additions, -97 deletions)

View changed files

📝 crates/horizon-client/src/entities.rs (+6 -0)
📝 crates/horizon-client/src/entity_nbt.rs (+52 -0)
📝 crates/horizon-client/src/game.rs (+4 -3)
📝 crates/horizon-client/src/game/armor_stands.rs (+11 -1)
📝 crates/horizon-client/src/game/creatures.rs (+4 -0)
📝 crates/horizon-client/src/game/debug_keys.rs (+1 -1)
📝 crates/horizon-client/src/game/dispenser.rs (+2 -0)
📝 crates/horizon-client/src/game/item_draw.rs (+18 -1)
📝 crates/horizon-client/src/game/maps.rs (+31 -0)
📝 crates/horizon-client/src/game/names.rs (+68 -3)
📝 crates/horizon-client/src/game/remote.rs (+230 -81)
📝 crates/horizon-client/src/game/remote_objects.rs (+8 -0)
📝 crates/horizon-client/src/game/scoreboard.rs (+5 -0)
📝 crates/horizon-client/src/game/zombie_villagers.rs (+2 -0)
📝 crates/horizon-client/src/hud.rs (+4 -2)
📝 crates/horizon-client/src/item_data.rs (+24 -1)
📝 crates/horizon-client/src/item_tooltip.rs (+18 -0)
📝 crates/horizon-client/src/mobs.rs (+10 -0)
📝 crates/horizon-client/src/mobs/render.rs (+4 -1)
📝 crates/horizon-client/src/skins.rs (+33 -0)

...and 3 more files

📄 Description

Summary

Serverside armor-stand holograms and related entity metadata did not render in Horizon. The root cause is in the protocol layer: the entity-metadata reader stopped at the first serializer id it does not implement, so a particle field (serializer 16/17) on an armor stand silently truncated the rest of the list, discarding the CustomName text and CustomNameVisible slots the hologram renderer relies on. Current main's own test encodes this truncation as expected behaviour; after this branch it decodes through.

The set branches off the earlier skins work and walks up to the root cause:

  • Server players' and NPCs' skins are downloaded and applied.
  • Armor-stand CustomNames are drawn as floating name tags, marker stands are hidden, and server entity names are read.
  • Server map art and item profiles render.
  • Item components are carried into tooltips, including names stored in empty-root component trees via their extra spans.
  • Serializers 16/17 (particles) decode as value-preserving ParticleData variants covering every 26.3 particle shape, with a static minecraft:particle_type id table and round-trip writes, so metadata lists keep walking past particle fields.

Rebase note: two conflicts against current main were resolved in game/remote.rs. to_stack keeps main's out.tidy() and uses the generic protocol_components + item_data::decode_components path, which covers every component main's per-component handling added (repair cost, map post-processing, books, custom name, enchantments); protocol_components gained arms for the WritableBook/WrittenBook variants main added to the enum, mapped into their vanilla NBT shapes.

Verified live against mc.gamster.org (protocol 26.3): the social-media hologram block ("TikTok: @gamstercommunity", Discord, Twitter, Instagram, Facebook), leaderboard lines, WAR panels, and the other floating-text stands decode and render through the existing nametag path. Rendering code is unchanged; the fix is decode-side.

Changes

  • crates/horizon-protocol/src/entity_data.rs: implement particle serializers 16/17 (Particle, ParticleData, 26.3 particle-type table, write_value arm) so metadata list decode no longer stops at the first unknown serializer.
  • crates/horizon-client: the earlier commits in the series add skin application, armor-stand nametags, marker hiding, server map art, item profiles, tooltip components, and empty-root component name reading. Rebase resolutions in game/remote.rs as noted above.

Test plan

  • cargo test -p horizon-protocol (68 passed)
  • cargo test -p horizon-client (all suites passed, 1013 tests in the main bin suite)
  • cargo fmt -p horizon-protocol -p horizon-client clean on the branch
  • Manual: joined mc.gamster.org offline as CairnProbe and confirmed hologram nametags in horizon-ctl status and in-game rendering after the rebase

Generated with Cairn Code · glm-5.3-flash-free


🔄 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/1228 **Author:** [@ItsPotatoTime](https://github.com/ItsPotatoTime) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/entity-metadata` --- ### 📝 Commits (8) - [`3993820`](https://github.com/horizon-rust/horizon/commit/399382084a2182fced1fc01792de3a6d2b8c35e3) fix(client): show server players' and NPCs' skins - [`a5e0645`](https://github.com/horizon-rust/horizon/commit/a5e0645610546dfaf9999d0e6df02438346a7aa5) fix(client): draw armor stand custom names as name tags - [`c139387`](https://github.com/horizon-rust/horizon/commit/c139387e2aa261afef1c502342cf03e49435e812) fix(client): read server map art and item profiles - [`d013278`](https://github.com/horizon-rust/horizon/commit/d01327862d008dfe3f636aab120e80fe959071c4) fix(client): hide marker stands and read server entity names - [`a20ebde`](https://github.com/horizon-rust/horizon/commit/a20ebde7ab2ad1fd88d8bd7577a862d614cab0c7) fix(client): carry every server item component into tooltips - [`9f6d781`](https://github.com/horizon-rust/horizon/commit/9f6d78178298609dd636725c891d72e591c592bd) fix(client): read empty-root component names through their extra spans - [`ad676af`](https://github.com/horizon-rust/horizon/commit/ad676af5eb05ff4bc420aca53378dd1b1bd650c4) fix(protocol): decode particle entity-data serializers so later slots survive - [`5b44452`](https://github.com/horizon-rust/horizon/commit/5b44452284e8f347db31a64252640e846b322e1c) fix(protocol): read PARTICLES as a list; keep every particle's data ### 📊 Changes **23 files changed** (+998 additions, -97 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entities.rs` (+6 -0) 📝 `crates/horizon-client/src/entity_nbt.rs` (+52 -0) 📝 `crates/horizon-client/src/game.rs` (+4 -3) 📝 `crates/horizon-client/src/game/armor_stands.rs` (+11 -1) 📝 `crates/horizon-client/src/game/creatures.rs` (+4 -0) 📝 `crates/horizon-client/src/game/debug_keys.rs` (+1 -1) 📝 `crates/horizon-client/src/game/dispenser.rs` (+2 -0) 📝 `crates/horizon-client/src/game/item_draw.rs` (+18 -1) 📝 `crates/horizon-client/src/game/maps.rs` (+31 -0) 📝 `crates/horizon-client/src/game/names.rs` (+68 -3) 📝 `crates/horizon-client/src/game/remote.rs` (+230 -81) 📝 `crates/horizon-client/src/game/remote_objects.rs` (+8 -0) 📝 `crates/horizon-client/src/game/scoreboard.rs` (+5 -0) 📝 `crates/horizon-client/src/game/zombie_villagers.rs` (+2 -0) 📝 `crates/horizon-client/src/hud.rs` (+4 -2) 📝 `crates/horizon-client/src/item_data.rs` (+24 -1) 📝 `crates/horizon-client/src/item_tooltip.rs` (+18 -0) 📝 `crates/horizon-client/src/mobs.rs` (+10 -0) 📝 `crates/horizon-client/src/mobs/render.rs` (+4 -1) 📝 `crates/horizon-client/src/skins.rs` (+33 -0) _...and 3 more files_ </details> ### 📄 Description ## Summary Serverside armor-stand holograms and related entity metadata did not render in Horizon. The root cause is in the protocol layer: the entity-metadata reader stopped at the first serializer id it does not implement, so a particle field (serializer 16/17) on an armor stand silently truncated the rest of the list, discarding the CustomName text and CustomNameVisible slots the hologram renderer relies on. Current main's own test encodes this truncation as expected behaviour; after this branch it decodes through. The set branches off the earlier skins work and walks up to the root cause: - Server players' and NPCs' skins are downloaded and applied. - Armor-stand CustomNames are drawn as floating name tags, marker stands are hidden, and server entity names are read. - Server map art and item profiles render. - Item components are carried into tooltips, including names stored in empty-root component trees via their extra spans. - Serializers 16/17 (particles) decode as value-preserving `ParticleData` variants covering every 26.3 particle shape, with a static minecraft:particle_type id table and round-trip writes, so metadata lists keep walking past particle fields. Rebase note: two conflicts against current main were resolved in `game/remote.rs`. `to_stack` keeps main's `out.tidy()` and uses the generic `protocol_components` + `item_data::decode_components` path, which covers every component main's per-component handling added (repair cost, map post-processing, books, custom name, enchantments); `protocol_components` gained arms for the `WritableBook`/`WrittenBook` variants main added to the enum, mapped into their vanilla NBT shapes. Verified live against mc.gamster.org (protocol 26.3): the social-media hologram block ("TikTok: @gamstercommunity", Discord, Twitter, Instagram, Facebook), leaderboard lines, WAR panels, and the other floating-text stands decode and render through the existing nametag path. Rendering code is unchanged; the fix is decode-side. ## Changes - `crates/horizon-protocol/src/entity_data.rs`: implement particle serializers 16/17 (`Particle`, `ParticleData`, 26.3 particle-type table, `write_value` arm) so metadata list decode no longer stops at the first unknown serializer. - `crates/horizon-client`: the earlier commits in the series add skin application, armor-stand nametags, marker hiding, server map art, item profiles, tooltip components, and empty-root component name reading. Rebase resolutions in `game/remote.rs` as noted above. ## Test plan - `cargo test -p horizon-protocol` (68 passed) - `cargo test -p horizon-client` (all suites passed, 1013 tests in the main bin suite) - `cargo fmt -p horizon-protocol -p horizon-client` clean on the branch - Manual: joined mc.gamster.org offline as CairnProbe and confirmed hologram nametags in `horizon-ctl status` and in-game rendering after the rebase Generated with Cairn Code · glm-5.3-flash-free --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:09:31 +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#3436
No description provided.