[PR #2461] [MERGED] Send /tellraw, /title and /playsound to LAN guests #4338

Closed
opened 2026-11-03 04:16:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2461
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/guest-text-commands


📝 Commits (2)

  • c417556 Send /tellraw, /title and /playsound to LAN guests
  • 65c60ab Play remote sounds in the category the packet names

📊 Changes

4 files changed (+109 additions, -30 deletions)

View changed files

📝 crates/horizon-client/src/game/commands/text_commands.rs (+51 -20)
📝 crates/horizon-client/src/game/commands/world_cmds.rs (+30 -3)
📝 crates/horizon-client/src/game/remote.rs (+11 -1)
📝 crates/horizon-client/src/lan/containers.rs (+17 -6)

📄 Description

What and why

On a LAN world, guests got nothing from /tellraw, /title and /playsound: only the host's own player was counted and reached. Now every matched player is, and guests are sent the same messages and packets as a real server would:

  • /tellraw goes to each player's chat.
  • /title (title, subtitle, actionbar, clear, reset, times) sends the title packets to each guest. The "Showed title for X" feedback now names the first matched player instead of always the host.
  • /playsound sends each guest the sound packet (guests in other levels are skipped, as vanilla does with player.level() == level). The command's count and feedback include guests, and the sound played for a guest who ran the command now reaches that guest instead of the host's speakers.

The sound packet builder in lan/containers.rs is split out so one guest can be sent a single packet.

Vanilla reference

TellRawCommand, TitleCommand and PlaySoundCommand.playSound (each sends to every matched ServerPlayer).

Self-check

cargo check -p horizon-client passes.


🔄 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/2461 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/guest-text-commands` --- ### 📝 Commits (2) - [`c417556`](https://github.com/horizon-rust/horizon/commit/c417556834aee38cd1a8f4a2815e5f09a753fb6b) Send /tellraw, /title and /playsound to LAN guests - [`65c60ab`](https://github.com/horizon-rust/horizon/commit/65c60ab996f596a020f614fa3f8e1f8ab1a83b7f) Play remote sounds in the category the packet names ### 📊 Changes **4 files changed** (+109 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/commands/text_commands.rs` (+51 -20) 📝 `crates/horizon-client/src/game/commands/world_cmds.rs` (+30 -3) 📝 `crates/horizon-client/src/game/remote.rs` (+11 -1) 📝 `crates/horizon-client/src/lan/containers.rs` (+17 -6) </details> ### 📄 Description ## What and why On a LAN world, guests got nothing from `/tellraw`, `/title` and `/playsound`: only the host's own player was counted and reached. Now every matched player is, and guests are sent the same messages and packets as a real server would: - `/tellraw` goes to each player's chat. - `/title` (title, subtitle, actionbar, clear, reset, times) sends the title packets to each guest. The "Showed title for X" feedback now names the first matched player instead of always the host. - `/playsound` sends each guest the sound packet (guests in other levels are skipped, as vanilla does with `player.level() == level`). The command's count and feedback include guests, and the sound played for a guest who ran the command now reaches that guest instead of the host's speakers. The sound packet builder in `lan/containers.rs` is split out so one guest can be sent a single packet. ## Vanilla reference `TellRawCommand`, `TitleCommand` and `PlaySoundCommand.playSound` (each sends to every matched `ServerPlayer`). ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:16:26 +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#4338
No description provided.