[PR #7354] [MERGED] Add native name tag render hook #7544

Closed
opened 2026-11-03 07:19:25 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7354
Author: @Xmilon
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: native/render-name-tag


📝 Commits (5)

  • 6db1f56 Add native name tag render hook
  • c193c2f Merge upstream/main
  • a8cdcce fix: preserve name tag fast paths without native mods
  • cf507c4 Merge upstream/main
  • b7ca31b Merge main into native/render-name-tag

📊 Changes

5 files changed (+159 additions, -21 deletions)

View changed files

📝 crates/horizon-client/src/game/names.rs (+98 -21)
📝 crates/horizon-client/src/game/native_hooks.rs (+19 -0)
📝 crates/horizon-client/src/mod_api/generated.rs (+35 -0)
📝 docs/native-mods.md (+2 -0)
➕ tools/native-hook-fragments/render_name_tag.json (+5 -0)

📄 Description

🤖 Opened by Xmilon's AI agent (Claude Code orchestrating GPT-6.1 Terra), not by Xmilon personally.

Closes #7304

Written by an AI agent (Claude Code orchestrating GPT-6.1 Terra) for Xmilon

Adds the client RenderNameTagEvent-style listen hook, allowing mods to override vanilla visibility and replace displayed text. Covered decisions: player name tags and team visibility (#6599), mob custom-name visibility and targeting, armor stand custom-name visibility, and targeted item-frame/glow-item-frame item names. All feed the shared name-tag geometry without a second dispatch. PR #7326 covers the separate item-frame render hook.

The local player's tag remains gated by the existing own-name-tag, camera, sleep, spectator and invisibility settings before this hook. Distance and entity availability gates also remain in place. Force-visible unnamed entities without replacement text produce an empty label.

Validation: cargo run -p xtask -- mod-api, cargo run -p xtask -- mod-api --check, cargo fmt, and git diff --check. No client build or cargo test was run, as requested; in-game behavior is not verified.

🤖 Generated with GPT-6.1 Terra (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/7354 **Author:** [@Xmilon](https://github.com/Xmilon) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `native/render-name-tag` --- ### 📝 Commits (5) - [`6db1f56`](https://github.com/horizon-rust/horizon/commit/6db1f56d7a9fee64e550222e20768bbc55bfcd2b) Add native name tag render hook - [`c193c2f`](https://github.com/horizon-rust/horizon/commit/c193c2f18b234514d095eaeea289dcdca8156bd2) Merge upstream/main - [`a8cdcce`](https://github.com/horizon-rust/horizon/commit/a8cdcce9d6c79479d3dfbe2f8816990463c9f252) fix: preserve name tag fast paths without native mods - [`cf507c4`](https://github.com/horizon-rust/horizon/commit/cf507c4996e2d8d2dd538e2e674929bc04b1164f) Merge upstream/main - [`b7ca31b`](https://github.com/horizon-rust/horizon/commit/b7ca31b03ad742f1890c4e46222236e834937c4c) Merge main into native/render-name-tag ### 📊 Changes **5 files changed** (+159 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/names.rs` (+98 -21) 📝 `crates/horizon-client/src/game/native_hooks.rs` (+19 -0) 📝 `crates/horizon-client/src/mod_api/generated.rs` (+35 -0) 📝 `docs/native-mods.md` (+2 -0) ➕ `tools/native-hook-fragments/render_name_tag.json` (+5 -0) </details> ### 📄 Description > 🤖 Opened by Xmilon's AI agent (Claude Code orchestrating GPT-6.1 Terra), not by Xmilon personally. Closes #7304 Written by an AI agent (Claude Code orchestrating GPT-6.1 Terra) for Xmilon Adds the client RenderNameTagEvent-style listen hook, allowing mods to override vanilla visibility and replace displayed text. Covered decisions: player name tags and team visibility (#6599), mob custom-name visibility and targeting, armor stand custom-name visibility, and targeted item-frame/glow-item-frame item names. All feed the shared name-tag geometry without a second dispatch. PR #7326 covers the separate item-frame render hook. The local player's tag remains gated by the existing own-name-tag, camera, sleep, spectator and invisibility settings before this hook. Distance and entity availability gates also remain in place. Force-visible unnamed entities without replacement text produce an empty label. Validation: `cargo run -p xtask -- mod-api`, `cargo run -p xtask -- mod-api --check`, `cargo fmt`, and `git diff --check`. No client build or cargo test was run, as requested; in-game behavior is not verified. 🤖 Generated with GPT-6.1 Terra (Codex) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:19:25 +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#7544
No description provided.