[PR #5802] [MERGED] feat(mods): cancellable first-person hand rendering #6507

Closed
opened 2026-11-03 06:21:47 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5802
Author: @Xmilon
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @levzzz5154

Base: main ← Head: native/5797-render-hand


📝 Commits (2)

  • f9e03cd feat(mods): add cancellable first-person hand rendering
  • 402bb0b Merge main into native/5797-render-hand; the hook only hides

📊 Changes

4 files changed (+92 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+12 -0)
📝 crates/horizon-client/src/game/native_hooks.rs (+15 -0)
➕ tests/test_render_hand_hook.py (+52 -0)
➕ tools/native-hook-fragments/render_hand.json (+13 -0)

📄 Description

🤖 Opened by Xmilon's AI agent (Codex), not by Xmilon personally.

What and why

Fixes #5797; part of #4953. Adds native_render_hand before each shown first-person hand. Mods receive the interaction hand, displayed stack (or None), partial tick, swing and inverse equip height, and may cancel that hand's default geometry. Empty arms and map geometry pass through the same cancellation point. Existing visibility gates remain.

Kind

  • feature: something new for players

Vanilla reference

Horizon's existing FirstPersonHandsAndItemsRenderer path, at the renderArmWithItem boundary. Public API contract: RenderHandEvent javadoc. This is a hook only; no vanilla behavior changes without a mod. Pinned-bytecode validation not run locally.

Other projects' code

None. Public javadoc consulted for the event contract; no implementation copied.

Self-check

Focused regression test compiles and executes the renderer's actual cancellation dispatch with a fake hook, checking either hand can be cancelled independently and all arguments reach it, including an empty stack. Client lib/bin/test Clippy passed; formatting checked. API fragment only; no assigned API number or generated catalog changes. Real-game, LAN/dedicated and screenshots not run; CI pending.

🤖 Generated with Codex


🔄 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/5802 **Author:** [@Xmilon](https://github.com/Xmilon) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `native/5797-render-hand` --- ### 📝 Commits (2) - [`f9e03cd`](https://github.com/horizon-rust/horizon/commit/f9e03cd32bcbb39639ba2de985f5bdad5f95aa94) feat(mods): add cancellable first-person hand rendering - [`402bb0b`](https://github.com/horizon-rust/horizon/commit/402bb0be5e75b498bc0d70c2067644936ecea261) Merge main into native/5797-render-hand; the hook only hides ### 📊 Changes **4 files changed** (+92 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+12 -0) 📝 `crates/horizon-client/src/game/native_hooks.rs` (+15 -0) ➕ `tests/test_render_hand_hook.py` (+52 -0) ➕ `tools/native-hook-fragments/render_hand.json` (+13 -0) </details> ### 📄 Description > 🤖 Opened by Xmilon's AI agent (Codex), not by Xmilon personally. ## What and why Fixes #5797; part of #4953. Adds `native_render_hand` before each shown first-person hand. Mods receive the interaction hand, displayed stack (or None), partial tick, swing and inverse equip height, and may cancel that hand's default geometry. Empty arms and map geometry pass through the same cancellation point. Existing visibility gates remain. ## Kind - [x] feature: something new for players ## Vanilla reference Horizon's existing FirstPersonHandsAndItemsRenderer path, at the renderArmWithItem boundary. Public API contract: [RenderHandEvent javadoc](https://aldak0.ru/javadoc/26.3.x/net/neoforged/neoforge/client/event/RenderHandEvent.html). This is a hook only; no vanilla behavior changes without a mod. Pinned-bytecode validation not run locally. ## Other projects' code None. Public javadoc consulted for the event contract; no implementation copied. ## Self-check Focused regression test compiles and executes the renderer's actual cancellation dispatch with a fake hook, checking either hand can be cancelled independently and all arguments reach it, including an empty stack. Client lib/bin/test Clippy passed; formatting checked. API fragment only; no assigned API number or generated catalog changes. Real-game, LAN/dedicated and screenshots not run; CI pending. 🤖 Generated with [Codex](https://openai.com/codex/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:21:47 +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#6507
No description provided.