Merge branch 'parity/tablist-border' into parity-base

# Conflicts:
#	README.md
#	crates/horizon-client/src/lib.rs
#	docs/rust-parity.md
This commit is contained in:
Ludovic Marie
2026-10-12 17:50:31 +02:00
22 changed files with 3208 additions and 65 deletions
+43
View File
@@ -1423,3 +1423,46 @@ Not compared yet: the recipe book's own drawing (tabs, buttons, the overlay
and ghost slots) and its text search, the banner preview's 3D flag (drawn as
the flat front face), furnaces awarding their recipes and experience when
their output is taken, and the limited crafting game rule.
## 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 (as `hud_layout::GuiDraw` calls, painted
like the rest of the HUD): **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. `WorldBorder::warning_strength` feeds `hud_overlays::vignette`
the border's warning strength at the camera. `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.