diff --git a/crates/horizon-client/src/game/bossbars.rs b/crates/horizon-client/src/game/bossbars.rs index d747fd749..51b64604f 100644 --- a/crates/horizon-client/src/game/bossbars.rs +++ b/crates/horizon-client/src/game/bossbars.rs @@ -474,9 +474,26 @@ impl Game<'_> { } out } - /// Dragon, withers, the raid and custom bars, in that order. + /// Custom bars (`CustomBossEvents.onPlayerConnect` sends them as a player + /// joins), then the dragon, withers and the raid. fn boss_events_for(&self, viewer: &Viewer) -> Vec { let mut out = Vec::new(); + for b in &self.bosses.bars.bars { + if !b.visible || !b.players.contains(&viewer.ints) { + continue; + } + out.push(Offer { + id: b.uuid, + name: json_to_tag(&b.name), + progress: b.progress(), + color: color_index(&b.color), + overlay: style_index(&b.style), + darken: b.darken, + music: b.music, + fog: b.fog, + scope: Scope::Global, + }); + } if viewer.here && let Some(progress) = self.dragon_boss_progress(viewer.at, viewer.alive) { @@ -543,22 +560,6 @@ impl Game<'_> { scope: Scope::Level(self.dim), }); } - for b in &self.bosses.bars.bars { - if !b.visible || !b.players.contains(&viewer.ints) { - continue; - } - out.push(Offer { - id: b.uuid, - name: json_to_tag(&b.name), - progress: b.progress(), - color: color_index(&b.color), - overlay: style_index(&b.style), - darken: b.darken, - music: b.music, - fog: b.fog, - scope: Scope::Global, - }); - } out } /// The packets that take `viewer` from what it was last sent to `desired`