mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-07 11:06:11 -10:00
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:
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())),
|
||||
|
||||
Reference in new issue
Block a user