[PR #4588] [MERGED] Show the armour stand preview in the smithing table #5713

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4588
Author: @phexuss
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @levzzz5154

Base: main ← Head: fix/smithing-armor-stand-preview


📝 Commits (2)

  • d63d89b Show the armour stand preview in the smithing table
  • bb674de Merge hr/main; smithing preview holds every non-armour item in the left hand

📊 Changes

3 files changed (+225 additions, -133 deletions)

View changed files

📝 crates/horizon-client/src/game/armor_stands.rs (+219 -132)
📝 crates/horizon-client/src/game/perspective.rs (+1 -1)
📝 crates/horizon-client/src/game/stations.rs (+5 -0)

📄 Description

🤖 Opened by phexuss's AI agent (Claude Code, Claude Opus 5.5), not by phexuss personally.

What and why

Part of #3518 (row SmithingScreen.updateArmorStandPreview).

The smithing table had no armour stand beside its slots. updateArmorStandPreview puts the result on a stand without its base plate and with its arms: armour goes in its equippable slot, anything else in the off hand. extractEntityInInventory then draws it in the box (121, 20) to (161, 80) at scale 25, moved up 1 and tilted by ARMOR_STAND_ANGLE (rotationXYZ(0.43633232, 0, PI)), with body yaw 210. To reuse the world's stand drawing (body, items, armour with trims and glint, wings), armor_stand_geometry's per-stand part moves into armor_stand_vertices with no change in behaviour.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

SmithingScreen (init, updateArmorStandPreview, slotChanged, extractBackground), InventoryScreen.extractEntityInInventory, ArmorStandRenderer. No harness: a unit test for which slot the result goes in. Not checked in game against vanilla, and written without the decompiled sources at hand (the box and angle are from memory), so a reviewer comparing against them is welcome.

Self-check

pr_ready (tools/pr_ready.py --quick on vm, against origin/main at 1c7eb1280, 1 min 20 s)

Check Result
Scope ✅ 3 files, +220 −132
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed (34 s)
rustfmt ✅ (7 s)
tests: horizon-client ✅ 1086 passed (22 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses

The clippy failure is manual_range_contains from the local toolchain (Rust 1.97) in files this PR doesn't touch (horizon-world/src/worldgen/aquifer/noise_based.rs, game/dragon.rs). With that lint allowed, cargo clippy -p horizon-client --lib --bins --tests -- -D warnings is clean.


🔄 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/4588 **Author:** [@phexuss](https://github.com/phexuss) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/smithing-armor-stand-preview` --- ### 📝 Commits (2) - [`d63d89b`](https://github.com/horizon-rust/horizon/commit/d63d89bb867b5222708ba8e9e5de2c510aa4eb56) Show the armour stand preview in the smithing table - [`bb674de`](https://github.com/horizon-rust/horizon/commit/bb674debd6a6a0bf703acf7dbb3138711999aae6) Merge hr/main; smithing preview holds every non-armour item in the left hand ### 📊 Changes **3 files changed** (+225 additions, -133 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/armor_stands.rs` (+219 -132) 📝 `crates/horizon-client/src/game/perspective.rs` (+1 -1) 📝 `crates/horizon-client/src/game/stations.rs` (+5 -0) </details> ### 📄 Description > 🤖 Opened by phexuss's AI agent (Claude Code, Claude Opus 5.5), not by phexuss personally. ## What and why Part of #3518 (row `SmithingScreen.updateArmorStandPreview`). The smithing table had no armour stand beside its slots. `updateArmorStandPreview` puts the result on a stand without its base plate and with its arms: armour goes in its `equippable` slot, anything else in the off hand. `extractEntityInInventory` then draws it in the box (121, 20) to (161, 80) at scale 25, moved up 1 and tilted by `ARMOR_STAND_ANGLE` (`rotationXYZ(0.43633232, 0, PI)`), with body yaw 210. To reuse the world's stand drawing (body, items, armour with trims and glint, wings), `armor_stand_geometry`'s per-stand part moves into `armor_stand_vertices` with no change in behaviour. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `SmithingScreen` (`init`, `updateArmorStandPreview`, `slotChanged`, `extractBackground`), `InventoryScreen.extractEntityInInventory`, `ArmorStandRenderer`. No harness: a unit test for which slot the result goes in. Not checked in game against vanilla, and written without the decompiled sources at hand (the box and angle are from memory), so a reviewer comparing against them is welcome. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on vm, against origin/main at 1c7eb1280, 1 min 20 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +220 −132 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed (34 s) | | rustfmt | ✅ (7 s) | | tests: horizon-client | ✅ 1086 passed (22 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | The clippy failure is `manual_range_contains` from the local toolchain (Rust 1.97) in files this PR doesn't touch (`horizon-world/src/worldgen/aquifer/noise_based.rs`, `game/dragon.rs`). With that lint allowed, `cargo clippy -p horizon-client --lib --bins --tests -- -D warnings` is clean. --- <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:29 +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#5713
No description provided.