[PR #4715] [MERGED] Send PlayerLookAt for /tp and /rotate facing #5802

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4715
Author: @levzzz5154
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: parity/31-lookat


📝 Commits (1)

  • 35212f0 Send ClientboundPlayerLookAtPacket for /tp facing and /rotate facing

📊 Changes

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

View changed files

📝 crates/horizon-client/src/game/commands.rs (+41 -0)
📝 crates/horizon-client/src/game/commands/world_cmds.rs (+18 -2)

📄 Description

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

Part of #3520

Rows:

  • ClientboundPlayerLookAtPacket.<init> / .getPosition / .write: the packet type, codec and client handler (remote_look_at) already existed, but nothing sent it. /tp ... facing and /rotate ... facing now send it to a connected player after turning them (send_player_look_at in game/commands.rs): from-anchor from the source's anchored, the point, and the entity+anchor when the target is a mob. Partial: non-mob entity targets (players, items) go as the point form only, as the Rust side has no network-id lookup for them.
  • Also fixed /rotate facing using the target's eye height always; vanilla's Entity.lookAt uses source.getAnchor() (feet by default).

The five ClientboundBossEventPacket rows were already on main (game/bossbars.rs diff_boss_events, remote.rs C::BossEvent).

Vanilla followed: ServerPlayer.lookAt (both overloads), LookAt.perform, TeleportCommand.performTeleport, RotateCommand.rotate.
Tests: none new (needs a live Game); clippy -p horizon-client --bins -D warnings clean.

🤖 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/4715 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/31-lookat` --- ### 📝 Commits (1) - [`35212f0`](https://github.com/horizon-rust/horizon/commit/35212f09a5dc569c6954fe1e795c864b08a13396) Send ClientboundPlayerLookAtPacket for /tp facing and /rotate facing ### 📊 Changes **2 files changed** (+59 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/commands.rs` (+41 -0) 📝 `crates/horizon-client/src/game/commands/world_cmds.rs` (+18 -2) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3520 Rows: - `ClientboundPlayerLookAtPacket.<init>` / `.getPosition` / `.write`: the packet type, codec and client handler (`remote_look_at`) already existed, but nothing sent it. `/tp ... facing` and `/rotate ... facing` now send it to a connected player after turning them (`send_player_look_at` in `game/commands.rs`): from-anchor from the source's `anchored`, the point, and the entity+anchor when the target is a mob. Partial: non-mob entity targets (players, items) go as the point form only, as the Rust side has no network-id lookup for them. - Also fixed `/rotate facing` using the target's eye height always; vanilla's `Entity.lookAt` uses `source.getAnchor()` (feet by default). The five `ClientboundBossEventPacket` rows were already on main (`game/bossbars.rs` `diff_boss_events`, `remote.rs` `C::BossEvent`). Vanilla followed: `ServerPlayer.lookAt` (both overloads), `LookAt.perform`, `TeleportCommand.performTeleport`, `RotateCommand.rotate`. Tests: none new (needs a live `Game`); `clippy -p horizon-client --bins -D warnings` clean. 🤖 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 05:15:06 +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#5802
No description provided.