[PR #7431] [MERGED] Allow named name tags to name armor stands #7600

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

📋 Pull Request Information

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

Base: main ← Head: fix/name-tag-armor-stand


📝 Commits (1)

  • 61c54f7 Name armor stands through named name-tag interactions

📊 Changes

3 files changed (+89 additions, -7 deletions)

View changed files

📝 crates/horizon-client/src/entities.rs (+38 -0)
📝 crates/horizon-client/src/game/armor_stands.rs (+21 -5)
📝 tools/lan_e2e.py (+30 -2)

📄 Description

🤖 Opened by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally.

What and why

A named name tag now names an armor stand and consumes one tag. Previously the armor-stand interaction rejected every name tag, while the naming implementation only handled the separate mob list.

The new path retains the custom-name component, handles the acting hand, swings, and emits the existing player-name-entity hook after a successful server-side change. It consumes one tag in creative mode as well. Unnamed tags pass; a dead target handles a named tag without changing its name or consuming the stack. Armor stands do not get mob persistence flags.

Fixes #7422.

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

Official Java 26.3 NameTagItem.interactLivingEntity: absent CUSTOM_NAME or a nonserializable target returns PASS. Otherwise it returns SUCCESS. On the server, a living target receives the component, a Mob gets persistence, and the stack shrinks by one without a creative exemption. Armor stands are living entities, but are not mobs.

Other projects' code

None.

Self-check

The focused resource-independent regression passes: named/unnamed tags, structured name preservation, and a dead target's handled-but-unchanged result.

lan_e2e.py --check frames now checks unnamed tags, server name state, the other client's query, and exactly one consumed tag in survival and creative, for host and guest. These use look-at coordinates and right clicks, following the existing equipment checks. The LAN runtime check requires full prepared game data and remains unrun locally.

pr_ready (tools/pr_ready.py --quick on a local runner, against origin/main at 0cf1b3d20, 3 min 22 s)

Check Result
Scope ✅ 3 files, +89 −7
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 613 passed (41 s)
rustfmt ✅ (5 s)
clippy ✅ (1 min 16 s)
tests: horizon-client, horizon-client-lib ✅ 2155 passed (53 s)
doc tests ✅ 0 passed (17 s)
content root tests ➖ content root untouched
mod API up to date ✅ (11 s)
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
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 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/7431 **Author:** [@TheMrZZ](https://github.com/TheMrZZ) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/name-tag-armor-stand` --- ### 📝 Commits (1) - [`61c54f7`](https://github.com/horizon-rust/horizon/commit/61c54f727b9ef46e4762f3bc3f53b82a7cd8fc35) Name armor stands through named name-tag interactions ### 📊 Changes **3 files changed** (+89 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entities.rs` (+38 -0) 📝 `crates/horizon-client/src/game/armor_stands.rs` (+21 -5) 📝 `tools/lan_e2e.py` (+30 -2) </details> ### 📄 Description > 🤖 Opened by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally. ## What and why A named name tag now names an armor stand and consumes one tag. Previously the armor-stand interaction rejected every name tag, while the naming implementation only handled the separate mob list. The new path retains the custom-name component, handles the acting hand, swings, and emits the existing player-name-entity hook after a successful server-side change. It consumes one tag in creative mode as well. Unnamed tags pass; a dead target handles a named tag without changing its name or consuming the stack. Armor stands do not get mob persistence flags. Fixes #7422. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference Official Java 26.3 `NameTagItem.interactLivingEntity`: absent `CUSTOM_NAME` or a nonserializable target returns `PASS`. Otherwise it returns `SUCCESS`. On the server, a living target receives the component, a `Mob` gets persistence, and the stack shrinks by one without a creative exemption. Armor stands are living entities, but are not mobs. ## Other projects' code None. ## Self-check The focused resource-independent regression passes: named/unnamed tags, structured name preservation, and a dead target's handled-but-unchanged result. `lan_e2e.py --check frames` now checks unnamed tags, server name state, the other client's query, and exactly one consumed tag in survival and creative, for host and guest. These use look-at coordinates and right clicks, following the existing equipment checks. The LAN runtime check requires full prepared game data and remains unrun locally. **pr_ready** (`tools/pr_ready.py --quick` on a local runner, against origin/main at 0cf1b3d20, 3 min 22 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +89 −7 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 613 passed (41 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (1 min 16 s) | | tests: horizon-client, horizon-client-lib | ✅ 2155 passed (53 s) | | doc tests | ✅ 0 passed (17 s) | | content root tests | ➖ content root untouched | | mod API up to date | ✅ (11 s) | | 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 | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 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 07:20: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#7600
No description provided.