[PR #4582] [MERGED] Draw the enchanting table's book in its screen #5709

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

📋 Pull Request Information

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

Base: main ← Head: fix/enchanting-book


📝 Commits (1)

  • aced527 Draw the enchanting table's book in its screen

📊 Changes

5 files changed (+236 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+1 -0)
📝 crates/horizon-client/src/game/remote.rs (+1 -0)
📝 crates/horizon-client/src/game/stations.rs (+115 -0)
📝 crates/horizon-client/src/item_render/gui.rs (+95 -0)
📝 crates/horizon-client/src/item_render/special.rs (+24 -0)

📄 Description

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

What and why

Part of #3518 (rows EnchantmentScreen.tickBook, EnchantmentScreen.extractBook, EnchantmentScreen.containerTick).

The enchanting table screen had no book in its top-left corner. This ports the book: tickBook each client tick while the screen is open (it opens 0.2 a tick while any offer has a cost, and a new item in the enchanting slot picks a page at least one away to turn to, with the flipT/flipA easing), and extractBook, which lerps open and flip by the partial tick and draws the enchanting table book model with the GUI entity lighting, posed and clipped like GuiGraphicsExtractor.book.

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

EnchantmentScreen.containerTick, tickBook, extractBook, GuiGraphicsExtractor.book, BookModel. No harness: unit tests for the book's tick (opening, page turns, closing), the page values from flip, and the pose. Not checked in game against vanilla, and written without the decompiled sources at hand, so a reviewer comparing against them is welcome.

Self-check

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

Check Result
Scope ✅ 5 files, +236 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed (35 s)
rustfmt ✅ (7 s)
tests: horizon-client ✅ 1088 passed (42 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/4582 **Author:** [@phexuss](https://github.com/phexuss) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/enchanting-book` --- ### 📝 Commits (1) - [`aced527`](https://github.com/horizon-rust/horizon/commit/aced5278853e34c692a5a674ef5bae546a1b9e47) Draw the enchanting table's book in its screen ### 📊 Changes **5 files changed** (+236 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+1 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+1 -0) 📝 `crates/horizon-client/src/game/stations.rs` (+115 -0) 📝 `crates/horizon-client/src/item_render/gui.rs` (+95 -0) 📝 `crates/horizon-client/src/item_render/special.rs` (+24 -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 (rows `EnchantmentScreen.tickBook`, `EnchantmentScreen.extractBook`, `EnchantmentScreen.containerTick`). The enchanting table screen had no book in its top-left corner. This ports the book: `tickBook` each client tick while the screen is open (it opens 0.2 a tick while any offer has a cost, and a new item in the enchanting slot picks a page at least one away to turn to, with the `flipT`/`flipA` easing), and `extractBook`, which lerps `open` and `flip` by the partial tick and draws the enchanting table book model with the GUI entity lighting, posed and clipped like `GuiGraphicsExtractor.book`. ## 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 `EnchantmentScreen.containerTick`, `tickBook`, `extractBook`, `GuiGraphicsExtractor.book`, `BookModel`. No harness: unit tests for the book's tick (opening, page turns, closing), the page values from `flip`, and the pose. Not checked in game against vanilla, and written without the decompiled sources at hand, so a reviewer comparing against them is welcome. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on vm, against origin/main at a3726f4bf, 1 min 41 s) | Check | Result | | --- | --- | | Scope | ✅ 5 files, +236 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed (35 s) | | rustfmt | ✅ (7 s) | | tests: horizon-client | ✅ 1088 passed (42 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:27 +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#5709
No description provided.