Native sidebar: line holders the sidebar shows (not '#', which vanilla hides)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Ludovic MarieandClaude Opus 5.5 committed 2026-10-31 17:16:46 +01:00
1 parent d1207de12b
commit 95cdad8b3a
1 file changed
+4 -2
@@ -347,8 +347,10 @@ impl Game<'_> {
let lines = &sidebar.lines[..sidebar.lines.len().min(15)];
for (i, (left, right)) in lines.iter().enumerate() {
packets.push(C::SetScore(play::SetScore {
// Highest first; the owners never show.
owner: format!("#line{i:02}"),
// Highest first. The display name shows, not the owner;
// an owner starting with '#' is hidden from the sidebar
// (ScoreHolder's isHidden), and ':' is in no player's name.
owner: format!("horizon:line{i:02}"),
objective: objective.clone(),
score: (lines.len() - i) as i32,
display: Some(component_nbt(&left.component())),