[PR #2868] [MERGED] Subtitles: fix closed captions never appearing #4661

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2868
Author: @masa-masa-0314
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/closed-captions


📝 Commits (2)

  • 91d401a Subtitles: a server's client ticks the overlay too
  • 5e14e30 comment not needed

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/remote.rs (+1 -0)

📄 Description

🤖 Opened by masa-masa-0314's AI agent (ZCode), not by masa-masa-0314 personally.

What and why

Show Subtitles never showed a caption: the subtitle overlay is never ticked in normal play.

Single player joins its integrated server as a client (open_integrated → connect_local), so Minecraft.tick takes the tick_remote path into tick_remote_level and never reaches tick_mobs, where tick_subtitles() had its only call (added by 2872884cb, before ed7e28101 put single player on the same server-client path as multiplayer).

tick_subtitles() is the only writer of Audio::record_heard, which sync_volumes copies into SoundEngine::listening. With it never running, the engine never called notify, so SubtitleOverlay received no sounds and drew nothing — with the option on or off, in single player and on servers.

This calls tick_subtitles() from tick_remote_level, beside tick_hud(), as the local path does. It is a call-site fix; nothing in the overlay, the sound engine or the options changed.

There is no issue to fix: the tracker has none (searched closed captions, captions, subtitles, showSubtitles), and the captions have been dead since the multiplayer client landed.

Vanilla reference

  • net.minecraft.client.gui.components.SubtitleOverlay.extractRenderState / onPlaySound / getBrightness: the layout, expiry, fade and arrows already match, and tools/test_subtitle_parity.py checks them frame by frame. This change only restores the per-tick delivery that the harness feeds by hand.
  • net.minecraft.client.sounds.SoundEngine.play and SoundEngine.tick: the listener notification point and getRange match SoundEngine::play_inner / notify; nothing there changed.

Self-check

pr_ready (tools/pr_ready.py --base upstream/main on DESKTOP-3050AHP, against upstream/main at 58beb9832, 8 min 13 s)

Check Result
Scope ✅ 1 files, +3 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 336 run, FAILED (failures=2, errors=7, skipped=1) (1 min 34 s)
rustfmt ✅ (16 s)
clippy ✅ (1 min 50 s)
tests: horizon-client ❌ 1160 passed, 2 failed (4 min 21 s)
doc tests ✅ 0 passed (8 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 ➖ not run (no vanilla data here): 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)

Both red checks are pre-existing on this Windows machine and were confirmed on clean upstream/main (58beb9832) before blaming the change:

  • horizon-client lib: save::tests::session_lock_is_exclusive (the OS reports the lock file still open) and crash::tests::stacks_start_at_the_panicking_frame (backtrace path format). These are the two documented Windows-only failures.
  • Python: test_port_harness captures an empty javac log, test_port_publish compares ~/code/... against a ~\code\... path, and test_parity_reach errors on the reach cache. The same 2 failures + 7 errors appear on clean upstream.

Screenshots

This machine's offscreen renderer is blank, so there is no screenshot. Verified end to end on a locally built client (--profile fast, single-player test-terrain world) through the control socket:

  • options-set showSubtitles true, then /playsound minecraft:entity.creeper.primed master @p: the HUD received the sound (listening=true heard=1) and drew the caption for three seconds.
  • With this call removed, the same run drew nothing.

🤖 Generated with ZCode


🔄 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/2868 **Author:** [@masa-masa-0314](https://github.com/masa-masa-0314) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/closed-captions` --- ### 📝 Commits (2) - [`91d401a`](https://github.com/horizon-rust/horizon/commit/91d401aa8af18c1e8225e0d5b3c3fa3945cac010) Subtitles: a server's client ticks the overlay too - [`5e14e30`](https://github.com/horizon-rust/horizon/commit/5e14e309bc312384761be8e427473639e93db83c) comment not needed ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+1 -0) </details> ### 📄 Description > 🤖 Opened by masa-masa-0314's AI agent (ZCode), not by masa-masa-0314 personally. ## What and why `Show Subtitles` never showed a caption: the subtitle overlay is never ticked in normal play. Single player joins its integrated server as a client (`open_integrated` → `connect_local`), so `Minecraft.tick` takes the `tick_remote` path into `tick_remote_level` and never reaches `tick_mobs`, where `tick_subtitles()` had its only call (added by `2872884cb`, before `ed7e28101` put single player on the same server-client path as multiplayer). `tick_subtitles()` is the only writer of `Audio::record_heard`, which `sync_volumes` copies into `SoundEngine::listening`. With it never running, the engine never called `notify`, so `SubtitleOverlay` received no sounds and drew nothing — with the option on or off, in single player and on servers. This calls `tick_subtitles()` from `tick_remote_level`, beside `tick_hud()`, as the local path does. It is a call-site fix; nothing in the overlay, the sound engine or the options changed. There is no issue to fix: the tracker has none (searched `closed captions`, `captions`, `subtitles`, `showSubtitles`), and the captions have been dead since the multiplayer client landed. ## Vanilla reference - `net.minecraft.client.gui.components.SubtitleOverlay.extractRenderState` / `onPlaySound` / `getBrightness`: the layout, expiry, fade and arrows already match, and `tools/test_subtitle_parity.py` checks them frame by frame. This change only restores the per-tick delivery that the harness feeds by hand. - `net.minecraft.client.sounds.SoundEngine.play` and `SoundEngine.tick`: the listener notification point and `getRange` match `SoundEngine::play_inner` / `notify`; nothing there changed. ## Self-check **pr_ready** (`tools/pr_ready.py --base upstream/main` on DESKTOP-3050AHP, against upstream/main at 58beb9832, 8 min 13 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +3 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 336 run, FAILED (failures=2, errors=7, skipped=1) (1 min 34 s) | | rustfmt | ✅ (16 s) | | clippy | ✅ (1 min 50 s) | | tests: horizon-client | ❌ 1160 passed, 2 failed (4 min 21 s) | | doc tests | ✅ 0 passed (8 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 | ➖ not run (no vanilla data here): 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) | Both red checks are pre-existing on this Windows machine and were confirmed on clean `upstream/main` (`58beb9832`) before blaming the change: - `horizon-client` lib: `save::tests::session_lock_is_exclusive` (the OS reports the lock file still open) and `crash::tests::stacks_start_at_the_panicking_frame` (backtrace path format). These are the two documented Windows-only failures. - Python: `test_port_harness` captures an empty javac log, `test_port_publish` compares `~/code/...` against a `~\code\...` path, and `test_parity_reach` errors on the reach cache. The same 2 failures + 7 errors appear on clean upstream. ## Screenshots This machine's offscreen renderer is blank, so there is no screenshot. Verified end to end on a locally built client (`--profile fast`, single-player test-terrain world) through the control socket: - `options-set showSubtitles true`, then `/playsound minecraft:entity.creeper.primed master @p`: the HUD received the sound (`listening=true heard=1`) and drew the caption for three seconds. - With this call removed, the same run drew nothing. 🤖 Generated with ZCode --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:01 +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#4661
No description provided.