[PR #317] [MERGED] Axes on copper: a shield in the off hand is raised first, and sculk sensors hear it #2485

Closed
opened 2026-11-02 15:56:34 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/317
Author: @ludovic111
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @ludovic111

Base: main ← Head: fix/axe-copper-animation


📝 Commits (1)

  • e162f9c Axes on copper: a shield in the off hand comes first, and sculk hears it

📊 Changes

1 file changed (+11 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+11 -0)

📄 Description

Fixes #222. Thanks to Cosmic (@Online5277) for the report!

What

Since the issue was filed, #59 (arm swing after successful uses) and #104 (scrape and wax-off particles) made axe use on copper animate. In game on current main, scraping and waxing off swing the arm (in creative, the item also dips as in vanilla's itemUsed), show the particles and change the block. Two parts of vanilla's BlockTransformer.transformBlock were still missing:

  • playerHasBlockingItemUseIntent: with a shield (any blocks_attacks item) in the off hand, right-clicking with an axe raises the shield instead of scraping, unless sneaking. Horizon scraped anyway.
  • The block_change game event, which sculk sensors pick up.

How tested

tools/parity.py --changed results below. In game on the Mac mini (offscreen, horizon-ctl screenshot), in ~/code/horizon-parity/shots/cosmic-227-265-222-221/:

  • axe_scrape_survival_t1.png and axe_scrape_survival_t2_swing.png: one tick apart after scraping oxidized copper in survival, showing the scrape particles and the swing.
  • axe_wax_off_creative.png, axe_scrape_creative.png: wax off and scrape in creative.
  • axe_shield_raised.png: shield in the off hand; the right click raises it (using = the off-hand slot) and the copper stays oxidized. Sneaking scrapes it.

Self-check (one integration commit of #227, #265 and #222 on origin/main 68ec2236, Mac mini):

cargo fmt --all --check                                        ok
cargo clippy --workspace --all-targets -- -D warnings          ok
cargo test -p horizon-client                                   632 + 38 + 15 + 2 + 2 + 1 passed, 0 failed
python3 tools/parity.py --changed origin/main                  79 passed, 0 failed in 15.3 min
python3 tools/parity.py sound_engine                           PASS (335,665 lines match, 11,167 steps)

Needs Ludovic

Nothing.

🤖 Generated with Claude Code


🔄 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/317 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/axe-copper-animation` --- ### 📝 Commits (1) - [`e162f9c`](https://github.com/horizon-rust/horizon/commit/e162f9cdb7d8756cdb2a4420e6e75c19968321ac) Axes on copper: a shield in the off hand comes first, and sculk hears it ### 📊 Changes **1 file changed** (+11 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+11 -0) </details> ### 📄 Description Fixes #222. Thanks to Cosmic (@Online5277) for the report! ## What Since the issue was filed, #59 (arm swing after successful uses) and #104 (scrape and wax-off particles) made axe use on copper animate. In game on current main, scraping and waxing off swing the arm (in creative, the item also dips as in vanilla's `itemUsed`), show the particles and change the block. Two parts of vanilla's `BlockTransformer.transformBlock` were still missing: - `playerHasBlockingItemUseIntent`: with a shield (any `blocks_attacks` item) in the off hand, right-clicking with an axe raises the shield instead of scraping, unless sneaking. Horizon scraped anyway. - The `block_change` game event, which sculk sensors pick up. ## How tested `tools/parity.py --changed` results below. In game on the Mac mini (offscreen, `horizon-ctl screenshot`), in `~/code/horizon-parity/shots/cosmic-227-265-222-221/`: - `axe_scrape_survival_t1.png` and `axe_scrape_survival_t2_swing.png`: one tick apart after scraping oxidized copper in survival, showing the scrape particles and the swing. - `axe_wax_off_creative.png`, `axe_scrape_creative.png`: wax off and scrape in creative. - `axe_shield_raised.png`: shield in the off hand; the right click raises it (`using` = the off-hand slot) and the copper stays oxidized. Sneaking scrapes it. Self-check (one integration commit of #227, #265 and #222 on origin/main 68ec2236, Mac mini): ``` cargo fmt --all --check ok cargo clippy --workspace --all-targets -- -D warnings ok cargo test -p horizon-client 632 + 38 + 15 + 2 + 2 + 1 passed, 0 failed python3 tools/parity.py --changed origin/main 79 passed, 0 failed in 15.3 min python3 tools/parity.py sound_engine PASS (335,665 lines match, 11,167 steps) ``` ## Needs Ludovic Nothing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:56:34 +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#2485
No description provided.