[PR #4633] [CLOSED] Pillager captains wear the ominous banner on a client (#4567) #5742

Closed
opened 2026-11-03 05:14:41 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4633
Author: @cryingtoilet
Created: 10/30/2026
Status: ❌ Closed

Base: main ← Head: fix/4567-ominous-banner-stack


📝 Commits (1)

  • 61c99d3 Pillager captains carry their ominous banner as the worn head stack

📊 Changes

2 files changed (+57 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/raids.rs (+1 -0)
📝 crates/horizon-client/src/mobs/raider.rs (+56 -2)

📄 Description

🤖 Opened by cryingtoilet's AI agent (OpenCode, DeepSeek V4.1 Flash), not by cryingtoilet personally.

What and why

A pillager or vindicator captain wore a plain white banner instead of the ominous one. Raider.isCaptain is a property of the banner the raider wears, but Horizon kept the head slot as the bare item id (Extra::head) and the PatrolLeader flag in server-side AI state:

  • the equipment packet therefore sent a white banner with no components;
  • a client never receives PatrolLeader, so mobs::raider::is_captain returned false there and captain_banner_geometry fell back to drawing the plain item.

wear_banner now also stores the ominous stack in Extra::armor[0], which is the stack mob_equipment puts on the wire, and is_captain accepts the banner's own ominous_banner component when the server state is absent. A plain white banner (for example one a dispenser put on the head) stays plain. The raid leader that picks up a dropped banner takes the same path.

Fixes #4567.

Vanilla reference

  • Raider.getBanner / Raider.isCaptain: captaincy comes from the worn white banner carrying the ominous component.
  • PatrollingMonster.setPatrolLeader plus Raider.finalizeSpawn: a leader wears the banner.
  • ClientboundSetEquipmentPacket: the worn stack is what reaches the client.

How it was checked

Three unit tests in mobs::raider::tests cover the leader's worn stack, a client that has only the synced stack, and a plain white banner that is not a captain. Rendering itself was read through game/mob_blocks.rs (captain_banner_geometry), not run: this checkout has no prepared vanilla resources in .local/.

pr_ready (tools/pr_ready.py --quick against origin/main at 6e8e088c2):

Check Result
Scope ✅ 2 files, +57 −2
Public tree ✅
Python tests ✅ 481 passed
rustfmt ✅
clippy ✅
tests: horizon-client ✅ 1090 passed
doc tests ✅

🤖 Generated with OpenCode


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/4633 **Author:** [@cryingtoilet](https://github.com/cryingtoilet) **Created:** 10/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/4567-ominous-banner-stack` --- ### 📝 Commits (1) - [`61c99d3`](https://github.com/horizon-rust/horizon/commit/61c99d344df1de567fee6d8f581c1bbd49b58d23) Pillager captains carry their ominous banner as the worn head stack ### 📊 Changes **2 files changed** (+57 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/raids.rs` (+1 -0) 📝 `crates/horizon-client/src/mobs/raider.rs` (+56 -2) </details> ### 📄 Description > 🤖 Opened by cryingtoilet's AI agent (OpenCode, DeepSeek V4.1 Flash), not by cryingtoilet personally. ## What and why A pillager or vindicator captain wore a plain white banner instead of the ominous one. `Raider.isCaptain` is a property of the banner the raider wears, but Horizon kept the head slot as the bare item id (`Extra::head`) and the `PatrolLeader` flag in server-side AI state: - the equipment packet therefore sent a white banner with no components; - a client never receives `PatrolLeader`, so `mobs::raider::is_captain` returned false there and `captain_banner_geometry` fell back to drawing the plain item. `wear_banner` now also stores the ominous stack in `Extra::armor[0]`, which is the stack `mob_equipment` puts on the wire, and `is_captain` accepts the banner's own `ominous_banner` component when the server state is absent. A plain white banner (for example one a dispenser put on the head) stays plain. The raid leader that picks up a dropped banner takes the same path. Fixes #4567. ## Vanilla reference - `Raider.getBanner` / `Raider.isCaptain`: captaincy comes from the worn white banner carrying the ominous component. - `PatrollingMonster.setPatrolLeader` plus `Raider.finalizeSpawn`: a leader wears the banner. - `ClientboundSetEquipmentPacket`: the worn stack is what reaches the client. ## How it was checked Three unit tests in `mobs::raider::tests` cover the leader's worn stack, a client that has only the synced stack, and a plain white banner that is not a captain. Rendering itself was read through `game/mob_blocks.rs` (`captain_banner_geometry`), not run: this checkout has no prepared vanilla resources in `.local/`. **pr_ready** (`tools/pr_ready.py --quick` against origin/main at 6e8e088c2): | Check | Result | | --- | --- | | Scope | ✅ 2 files, +57 −2 | | Public tree | ✅ | | Python tests | ✅ 481 passed | | rustfmt | ✅ | | clippy | ✅ | | tests: horizon-client | ✅ 1090 passed | | doc tests | ✅ | 🤖 Generated with [OpenCode](https://opencode.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:14:41 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5742
No description provided.