Document the player list and world border parity harnesses

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-12 16:08:40 +02:00
parent e4bb8463b9
commit 95c7e7ad2a
2 changed files with 45 additions and 3 deletions
+42
View File
@@ -1288,3 +1288,45 @@ binding. Rendering, transport, full entity lifecycle integration and playable
Linux gameplay remain unfinished. In this pinned version,
`LivingEntity.updateDataBeforeSync` invokes dirty effect synchronization; it is a
separate phase from `tickEffects`.
## Player list and world border rendering
`horizon_client::tab_list` lays out vanilla's `PlayerTabOverlay` as draw calls:
the listed players in `PLAYER_COMPARATOR` order (higher list order first,
spectators last, team name, profile name ignoring case), at most 80 of them in
columns of 20 rows; heads with the default skin for the UUID, flipped for
Dinnerbone and Grumm in the level, only in online mode; team prefix, suffix and
colour; italic, translucent spectator names (italic at the component root);
ping bars; the `list` objective as scores in their number format (the score's,
the objective's, or yellow) or as hearts with `HealthState`'s change blink and
the `hp` text when they no longer fit; and the header and footer wrapped by
`Font::split_lines`, which now follows `StringSplitter.splitLines`, with legacy
`§` codes applied by `Text::resolve_legacy`. `Hud.extractTabList`'s rule hides
the list in single player unless a `list` objective is set.
`tools/test_tab_list_parity.py` runs vanilla's own `extractRenderState` frame
after frame (`VanillaTabListOracle`: stand-in connection, level and options,
real `Scoreboard`) against `examples/tab_list_fixture` and compares every fill,
styled text run, sprite and face blit: **1,000 cases, 3,476 frames and 844,758
calls match**. The game draws the same layout while the player-list key is
held, from the local player and scoreboard in single player and from
`PlayerInfoUpdate`, the tab list header and footer, `onlineMode` and the
objective, score, display-slot and team packets on a server (checked live
against the 26.3 server jar). Real skins are not downloaded: every head uses
its default skin. Horizon has no "chat background only" option, so the row
background is vanilla's default.
The client `WorldBorder` wraps `horizon_core::geometry::border` (checked by
`test_world_border_parity.py`) and `horizon_client::border_render` ports
`WorldBorderRenderer`: `extract`'s fade (`(1 - distance / render distance)^4`)
and status colour (growing, shrinking, stationary), the wall buffer that is only
rebuilt when the border moves, the model offset and the texture scroll of
`prepareDynamicTransforms`, and `draw`'s walls within the render distance,
nearest first. The vignette takes `Hud.extractVignette`'s int colour and warning
strength. `tools/test_world_border_render_parity.py` drives vanilla's border,
renderer and vignette (`VanillaWorldBorderRenderOracle`, with a stand-in GPU
device, dynamic-uniform writer and render pass) against
`examples/world_border_render_fixture`: **1,500 cases and 16,859 frames match
bit for bit** (8,513 with the wall drawn). The game draws the wall with
`RenderPipelines.WORLD_BORDER`'s overlay blend and the mipmapped forcefield
texture, and follows the server's border packets. One border is kept for all
dimensions.