[PR #5804] [MERGED] feat(mods): cancellable targeted block highlights #6510

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

📋 Pull Request Information

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

Base: main ← Head: native/block-highlight


📝 Commits (1)

  • f4d6eba feat(mods): allow cancelling targeted block highlights

📊 Changes

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

View changed files

📝 crates/horizon-client/src/game.rs (+6 -0)
📝 crates/horizon-client/src/game/native_hooks.rs (+11 -0)
➕ tests/test_block_highlight_hook.py (+51 -0)
➕ tools/native-hook-fragments/block_highlight.json (+12 -0)

📄 Description

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

What and why

Fixes #5803; part of #4953. native_block_highlight(pos, state, partial, canceled) lets a mod suppress the default selection outline for an eligible targeted block. The hook runs after the existing F1, game-mode and adventure gates, before outline geometry is built. No entity highlight or custom geometry API is added.

Kind

  • feature: something new for players

Vanilla reference

Horizon's existing LevelExtractor.extractBlockOutline path. #4953 names the older RenderHighlightEvent.Block; the 26.3 public event index calls the extraction event ExtractBlockOutlineRenderStateEvent: https://aldak0.ru/javadoc/26.3.x/net/neoforged/neoforge/client/event/package-summary.html . This small cancellation hook does not claim the entire NeoForge event contract. Pinned-bytecode validation not run locally.

Other projects' code

None; public javadoc consulted, no external implementation code read or copied.

Self-check

Client lib/bin/test Clippy passed. The regression test executes the actual outline filter with a fake mod: normal, cancelled and missing-target paths, argument forwarding, and existing restriction-before-hook wiring. Formatting and diff checks passed. Fragment only; no API number assigned. In-game visuals, LAN/dedicated 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/5804 **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/block-highlight` --- ### 📝 Commits (1) - [`f4d6eba`](https://github.com/horizon-rust/horizon/commit/f4d6ebab0cc38a40bfffd66679cd0f864da50098) feat(mods): allow cancelling targeted block highlights ### 📊 Changes **4 files changed** (+80 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+6 -0) 📝 `crates/horizon-client/src/game/native_hooks.rs` (+11 -0) ➕ `tests/test_block_highlight_hook.py` (+51 -0) ➕ `tools/native-hook-fragments/block_highlight.json` (+12 -0) </details> ### 📄 Description > 🤖 Opened by Xmilon's AI agent (Codex), not by Xmilon personally. ## What and why Fixes #5803; part of #4953. `native_block_highlight(pos, state, partial, canceled)` lets a mod suppress the default selection outline for an eligible targeted block. The hook runs after the existing F1, game-mode and adventure gates, before outline geometry is built. No entity highlight or custom geometry API is added. ## Kind - [x] feature: something new for players ## Vanilla reference Horizon's existing LevelExtractor.extractBlockOutline path. #4953 names the older RenderHighlightEvent.Block; the 26.3 public event index calls the extraction event ExtractBlockOutlineRenderStateEvent: https://aldak0.ru/javadoc/26.3.x/net/neoforged/neoforge/client/event/package-summary.html . This small cancellation hook does not claim the entire NeoForge event contract. Pinned-bytecode validation not run locally. ## Other projects' code None; public javadoc consulted, no external implementation code read or copied. ## Self-check Client lib/bin/test Clippy passed. The regression test executes the actual outline filter with a fake mod: normal, cancelled and missing-target paths, argument forwarding, and existing restriction-before-hook wiring. Formatting and diff checks passed. Fragment only; no API number assigned. In-game visuals, LAN/dedicated 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:48 +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#6510
No description provided.