[PR #7916] Tag add reaches tridents, rockets and falling blocks #7895

Open
opened 2026-11-03 07:26:18 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7916
Author: @HrafnaValkyrja
Created: 11/3/2026
Status: 🔄 Open

Base: main ← Head: fix/tag-add-kinds


📝 Commits (1)

  • 3091a53 /tag add reaches a thrown trident, a firework rocket and a falling block

📊 Changes

2 files changed (+50 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/commands/data.rs (+11 -0)
📝 tools/lan_e2e.py (+39 -2)

📄 Description

🤖 Opened by Valkyrie's AI agent (Claude Code, Opus 5.5), not by Valkyrie herself.

What and why

/tag <selector> add <tag> wrote nothing for a thrown trident, a firework rocket or a falling block and still reported success, so @e[tag=<tag>] never found them. Entity.getTags is read from the same place the other kinds keep their Tags (tags_of reads the rocket's and the trident's compound by entity id and the falling block's saved compound), but the writer, raw_mut in game/commands/data.rs, had no arm for them and returned None (the gap the primed-TNT arm there already describes). Rockets and tridents now write to their compound by entity id; a falling block writes to its saved compound, creating it when it has none.

Fixes #7915

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Entity.getTags / Entity.addTag (Tags in the saved data), TagCommand, EntitySelector (tag=).

Proof

Side-by-side scene tagkinds against the real 26.3 server: 18 kinds (arrow, spectral arrow, snowball, egg, ender pearl, trident, firework rocket, falling block, primed TNT, wind charge, small fireball, fireball, experience bottle, splash potion, experience orb, item, boat, minecart), each summoned with a tag in its NBT and tagged again with /tag add; @e[tag=] counts and Pos of each, plus the count by type, at ticks 1 and 4.

values matching vanilla
origin/main 250 of 270
this change 262 of 270

The rows that were wrong and now match: /tag add on the trident, the rocket and the falling block. The 8 that still differ are the spectral arrow (@e[type=minecraft:spectral_arrow] finds nothing, @e[type=minecraft:arrow] counts it), a different cause, not changed here. The order of a Tags list in data get (vanilla prints a set) is not compared.

tools/lan_e2e.py --check entity-tags (a console summons each of the three kinds, tags it with /tag add and asks execute if entity @e[tag=...]): passes on this change; on origin/main it fails at the trident (/tag add on a trident did not reach @e[tag=]: Test failed).

Harnesses

DISPLAY=:0 HORIZON_E2E_HEADLESS=1, own empty .local/parity-target: tools/parity.py command_exec server_entities arrow trident remote_fireworks: 5 passed, 0 failed in 1.9 min (command_exec 54 s, server_entities 113 s, arrow 36 s, trident 20 s, remote_fireworks 35 s).. tools/pr_ready.py --quick: rustfmt, clippy, 717 tests in horizon-client and 614 Python tests pass; the other affected parity harnesses are left to CI.

What wasn't compared

  • /data modify and /data merge on these three kinds (they write to the same place and were not run).
  • A falling block that was never summoned with a saved compound, tagged after it landed.
  • Spectral arrows (above).

Proved by script against the real 26.3 server; no human played this change.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick on Valhalla, against origin/main at 31f83499b, 4 min 22 s)

Check Result
Scope ✅ 2 files, +50 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 614 passed (31 s)
rustfmt ✅ (7 s)
Rust ⚠️ 1.98.0 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with rustup update
clippy ✅ (1 min 46 s)
tests: horizon-client ✅ 717 passed (1 min 42 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
mod API up to date ✅ (14 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 Claude Code

https://claude.ai/code/session_018zuDTsnyHkP28bzn3u7S3m


🔄 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/7916 **Author:** [@HrafnaValkyrja](https://github.com/HrafnaValkyrja) **Created:** 11/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/tag-add-kinds` --- ### 📝 Commits (1) - [`3091a53`](https://github.com/horizon-rust/horizon/commit/3091a5363c640e047657c5eafde27d71c57e82ab) /tag add reaches a thrown trident, a firework rocket and a falling block ### 📊 Changes **2 files changed** (+50 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/commands/data.rs` (+11 -0) 📝 `tools/lan_e2e.py` (+39 -2) </details> ### 📄 Description > 🤖 Opened by Valkyrie's AI agent (Claude Code, Opus 5.5), not by Valkyrie herself. ## What and why `/tag <selector> add <tag>` wrote nothing for a thrown trident, a firework rocket or a falling block and still reported success, so `@e[tag=<tag>]` never found them. `Entity.getTags` is read from the same place the other kinds keep their `Tags` (`tags_of` reads the rocket's and the trident's compound by entity id and the falling block's saved compound), but the writer, `raw_mut` in `game/commands/data.rs`, had no arm for them and returned `None` (the gap the primed-TNT arm there already describes). Rockets and tridents now write to their compound by entity id; a falling block writes to its saved compound, creating it when it has none. Fixes #7915 ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `Entity.getTags` / `Entity.addTag` (`Tags` in the saved data), `TagCommand`, `EntitySelector` (`tag=`). ## Proof Side-by-side scene `tagkinds` against the real 26.3 server: 18 kinds (arrow, spectral arrow, snowball, egg, ender pearl, trident, firework rocket, falling block, primed TNT, wind charge, small fireball, fireball, experience bottle, splash potion, experience orb, item, boat, minecart), each summoned with a tag in its NBT and tagged again with `/tag add`; `@e[tag=]` counts and `Pos` of each, plus the count by type, at ticks 1 and 4. | | values matching vanilla | |---|---| | origin/main | 250 of 270 | | this change | 262 of 270 | The rows that were wrong and now match: `/tag add` on the trident, the rocket and the falling block. The 8 that still differ are the spectral arrow (`@e[type=minecraft:spectral_arrow]` finds nothing, `@e[type=minecraft:arrow]` counts it), a different cause, not changed here. The order of a `Tags` list in `data get` (vanilla prints a set) is not compared. `tools/lan_e2e.py --check entity-tags` (a console summons each of the three kinds, tags it with `/tag add` and asks `execute if entity @e[tag=...]`): passes on this change; on origin/main it fails at the trident (`/tag add on a trident did not reach @e[tag=]: Test failed`). ## Harnesses `DISPLAY=:0 HORIZON_E2E_HEADLESS=1`, own empty `.local/parity-target`: `tools/parity.py command_exec server_entities arrow trident remote_fireworks`: 5 passed, 0 failed in 1.9 min (command_exec 54 s, server_entities 113 s, arrow 36 s, trident 20 s, remote_fireworks 35 s).. `tools/pr_ready.py --quick`: rustfmt, clippy, 717 tests in horizon-client and 614 Python tests pass; the other affected parity harnesses are left to CI. ## What wasn't compared - `/data modify` and `/data merge` on these three kinds (they write to the same place and were not run). - A falling block that was never summoned with a saved compound, tagged after it landed. - Spectral arrows (above). Proved by script against the real 26.3 server; no human played this change. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on Valhalla, against origin/main at 31f83499b, 4 min 22 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +50 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 614 passed (31 s) | | rustfmt | ✅ (7 s) | | Rust | ⚠️ 1.98.0 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with `rustup update` | | clippy | ✅ (1 min 46 s) | | tests: horizon-client | ✅ 717 passed (1 min 42 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | mod API up to date | ✅ (14 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 [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018zuDTsnyHkP28bzn3u7S3m --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7895
No description provided.