[PR #6559] [MERGED] /data get entity @s prints the acting player's own UUID, not the world owner's #6950

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

📋 Pull Request Information

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

Base: main ← Head: fix/data-player-uuid


📝 Commits (1)

  • 755d221 /data get entity @s prints the acting player's own UUID, not the world owner's

📊 Changes

2 files changed (+22 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/commands/data.rs (+6 -1)
📝 tools/lan_e2e.py (+16 -0)

📄 Description

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

Fixes #6558

/data get entity @s UUID printed the world owner's UUID for every player. entity_nbt_in_level (game/commands/data.rs) stamped UUID from level.player_uuid, which is the owner's UUID, even during a guest's turn. On the server thread every player is a guest, so everyone got offline_uuid("Player").

It now uses the acting guest's UUID (lan_acting_uuid), the same way acting_uuid() does, and falls back to the owner's UUID outside a guest's turn.

Test

New check, python3 tools/lan_e2e.py --check data_uuid: the guest and the host each run /data get entity @s UUID and must get their own offline UUID (UUIDUtil.createOfflinePlayerUUID).

  • Without the fix: FAIL, both print -1608632253,-450807400,-1786055591,-2146546415.
  • With the fix: pass. Guest gets 1078040746,-865849311,-1612740762,-1060107924 and the host gets its own UUID.

I also checked by hand on the server thread: a wolf summoned with the printed Owner now follows its player and teleports to them.

Self-check

  • cargo fmt --all -- --check: ok
  • cargo clippy -p horizon-client --no-default-features --lib --bins -- -D warnings: ok
  • cargo test -p horizon-client --no-default-features --lib --bins: 588 passed
  • python3 tools/port_ledger.py check --base origin/main: ok
  • tools/pr_ready.py was not run: this machine lacks the ALSA headers, so I built with --no-default-features.

🤖 Generated with Claude Code


🔄 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/6559 **Author:** [@ClickingMaster](https://github.com/ClickingMaster) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/data-player-uuid` --- ### 📝 Commits (1) - [`755d221`](https://github.com/horizon-rust/horizon/commit/755d2215c5136063bc1da915c77d5055ae28877b) /data get entity @s prints the acting player's own UUID, not the world owner's ### 📊 Changes **2 files changed** (+22 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/commands/data.rs` (+6 -1) 📝 `tools/lan_e2e.py` (+16 -0) </details> ### 📄 Description > 🤖 Opened by ClickingMaster's AI agent (Claude Code, Claude Opus 5.5), not by ClickingMaster personally. Fixes #6558 `/data get entity @s UUID` printed the world owner's UUID for every player. `entity_nbt_in_level` (`game/commands/data.rs`) stamped `UUID` from `level.player_uuid`, which is the owner's UUID, even during a guest's turn. On the server thread every player is a guest, so everyone got `offline_uuid("Player")`. It now uses the acting guest's UUID (`lan_acting_uuid`), the same way `acting_uuid()` does, and falls back to the owner's UUID outside a guest's turn. ## Test New check, `python3 tools/lan_e2e.py --check data_uuid`: the guest and the host each run `/data get entity @s UUID` and must get their own offline UUID (`UUIDUtil.createOfflinePlayerUUID`). - Without the fix: FAIL, both print `-1608632253,-450807400,-1786055591,-2146546415`. - With the fix: pass. `Guest` gets `1078040746,-865849311,-1612740762,-1060107924` and the host gets its own UUID. I also checked by hand on the server thread: a wolf summoned with the printed `Owner` now follows its player and teleports to them. ## Self-check - `cargo fmt --all -- --check`: ok - `cargo clippy -p horizon-client --no-default-features --lib --bins -- -D warnings`: ok - `cargo test -p horizon-client --no-default-features --lib --bins`: 588 passed - `python3 tools/port_ledger.py check --base origin/main`: ok - `tools/pr_ready.py` was not run: this machine lacks the ALSA headers, so I built with `--no-default-features`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:30:02 +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#6950
No description provided.