[PR #6468] [MERGED] Tags stay on summoned projectiles, orbs and End crystals #6895

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6468
Author: @HrafnaValkyrja
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/selectors-entity-kinds


📝 Commits (3)

  • 2b08d63 Selectors and /data see Tags on orbs, projectiles, crystals and the dragon
  • eabcca7 Merge origin/main
  • 2ca6050 Merge origin/main

📊 Changes

5 files changed (+94 additions, -11 deletions)

View changed files

📝 crates/horizon-client/src/entity_nbt.rs (+3 -1)
📝 crates/horizon-client/src/game/commands/data.rs (+15 -6)
📝 crates/horizon-client/src/game/persist.rs (+32 -3)
📝 crates/horizon-client/src/game/scoreboard.rs (+4 -1)
📝 tools/lan_e2e.py (+40 -0)

📄 Description

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

What and why

Tags given to a summoned experience orb, arrow, snowball, egg, ender pearl, fireball, small fireball, wind charge, End crystal or Ender Dragon were dropped, so @e[tag=...] found nothing and /tag ... add on them reported success but wrote nothing. /data get entity on a wind charge answered "no entity" although @e[type=minecraft:wind_charge] found it.

Cause: these kinds keep no saved compound (only a position-keyed copy used when saving), so the selector's tag lookup, /tag and /data had nowhere to read or write Tags. They now keep their Tags by entity id, like the other kinds, are forgotten with the entity, and are written back by /data get and when the chunk is saved. A wind charge is written like the other fireballs (acceleration_power, no ExplosionPower).

Changed: game/persist.rs, game/scoreboard.rs, game/commands/data.rs, entity_nbt.rs. Firework rockets are not touched (#6179).

Fixes #6467

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.addAdditionalSaveData (Tags), EntitySelector tag=, TagCommand, DataCommands entity accessor.

Test

tools/lan_e2e.py --check selector-tags summons eight kinds with Tags, tags a ninth after the fact and reads a wind charge with data entity: passes with the fix, and fails with the fix reverted (cannot see these: ['experience_orb', 'arrow', 'snowball', 'egg', 'ender_pearl', 'fireball', 'small_fireball', 'wind_charge', 'late', 'data']).

Numbers

Side-by-side scene selkinds (26 entity kinds summoned with a tag, counted by @e[type=], @e[tag=], /data get ... Pos, then /kill): values matching vanilla went from 129 of 156 to 149 of 156. The 18 tag counts and 2 wind charge Pos reads now match.

What wasn't compared

  • The 7 values still differing: 3 are firework rockets (#6179); 4 are Pos of an arrow and an experience orb summoned with NoGravity:1b, which Horizon still lets fall (arrow y 104.95 vs 105.0, orb y 104.91 vs 105.0). Not part of this change.
  • Fishing hooks cannot be summoned without a player, so they were not compared.
  • Tags on the dragon and crystal go through the same path but only the crystal count was in the scene.

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 ed102e059, 6 min 44 s)

Check Result
Scope ✅ 6 files, +95 −15
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 594 passed (25 s)
rustfmt ✅ (6 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 29 s)
tests: horizon-client, horizon-client-lib ✅ 1908 passed (4 min 38 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 338 affected, to run in CI (--quick): armor_stand_frost, arrow, arrow_wind_charge, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_tint, block_transformer, boat_authority and 326 more
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/6468 **Author:** [@HrafnaValkyrja](https://github.com/HrafnaValkyrja) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/selectors-entity-kinds` --- ### 📝 Commits (3) - [`2b08d63`](https://github.com/horizon-rust/horizon/commit/2b08d635d945eacd750cb0ada5876d5527d479f5) Selectors and /data see Tags on orbs, projectiles, crystals and the dragon - [`eabcca7`](https://github.com/horizon-rust/horizon/commit/eabcca7b2705302ae9d9e124ad9f0272375ec5d9) Merge origin/main - [`2ca6050`](https://github.com/horizon-rust/horizon/commit/2ca605090cb15914464871b3b4911446b6d9787c) Merge origin/main ### 📊 Changes **5 files changed** (+94 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entity_nbt.rs` (+3 -1) 📝 `crates/horizon-client/src/game/commands/data.rs` (+15 -6) 📝 `crates/horizon-client/src/game/persist.rs` (+32 -3) 📝 `crates/horizon-client/src/game/scoreboard.rs` (+4 -1) 📝 `tools/lan_e2e.py` (+40 -0) </details> ### 📄 Description > 🤖 Opened by Valkyrie's AI agent (Claude Code, Opus 5.5), not by Valkyrie herself. ## What and why `Tags` given to a summoned experience orb, arrow, snowball, egg, ender pearl, fireball, small fireball, wind charge, End crystal or Ender Dragon were dropped, so `@e[tag=...]` found nothing and `/tag ... add` on them reported success but wrote nothing. `/data get entity` on a wind charge answered "no entity" although `@e[type=minecraft:wind_charge]` found it. Cause: these kinds keep no saved compound (only a position-keyed copy used when saving), so the selector's tag lookup, `/tag` and `/data` had nowhere to read or write `Tags`. They now keep their `Tags` by entity id, like the other kinds, are forgotten with the entity, and are written back by `/data get` and when the chunk is saved. A wind charge is written like the other fireballs (`acceleration_power`, no `ExplosionPower`). Changed: `game/persist.rs`, `game/scoreboard.rs`, `game/commands/data.rs`, `entity_nbt.rs`. Firework rockets are not touched (#6179). Fixes #6467 ## 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.addAdditionalSaveData` (`Tags`), `EntitySelector` `tag=`, `TagCommand`, `DataCommands` entity accessor. ## Test `tools/lan_e2e.py --check selector-tags` summons eight kinds with `Tags`, tags a ninth after the fact and reads a wind charge with `data entity`: passes with the fix, and fails with the fix reverted (`cannot see these: ['experience_orb', 'arrow', 'snowball', 'egg', 'ender_pearl', 'fireball', 'small_fireball', 'wind_charge', 'late', 'data']`). ## Numbers Side-by-side scene `selkinds` (26 entity kinds summoned with a tag, counted by `@e[type=]`, `@e[tag=]`, `/data get ... Pos`, then `/kill`): values matching vanilla went from 129 of 156 to 149 of 156. The 18 tag counts and 2 wind charge `Pos` reads now match. ## What wasn't compared - The 7 values still differing: 3 are firework rockets (#6179); 4 are `Pos` of an arrow and an experience orb summoned with `NoGravity:1b`, which Horizon still lets fall (arrow y 104.95 vs 105.0, orb y 104.91 vs 105.0). Not part of this change. - Fishing hooks cannot be summoned without a player, so they were not compared. - `Tags` on the dragon and crystal go through the same path but only the crystal count was in the scene. 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 ed102e059, 6 min 44 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +95 −15 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 594 passed (25 s) | | rustfmt | ✅ (6 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 29 s) | | tests: horizon-client, horizon-client-lib | ✅ 1908 passed (4 min 38 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 338 affected, to run in CI (--quick): armor_stand_frost, arrow, arrow_wind_charge, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_tint, block_transformer, boat_authority and 326 more | | 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>
bsakaguchi 2026-11-03 06:28:45 +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#6895
No description provided.