[PR #7099] [MERGED] Port ledger: RepeatedNarrator.narrate needs no port, it is Realms-only #7337

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

📋 Pull Request Information

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

Base: main ← Head: chore/narrator-rest-012


📝 Commits (1)

  • bee28cd Port ledger: RepeatedNarrator.narrate is Realms-only

📊 Changes

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

View changed files

📝 tools/port_map/rest-012.tsv (+1 -1)

📄 Description

Corrects one stale row in tools/port_map/rest-012.tsv, checked against upstream/main (26.3).

row was now
RepeatedNarrator.narrate skip:other — "accessibility narration; Horizon has no narrator" skip:service — the Realms long-running task screen's rate-limited system narration

Citations:

  • net/minecraft/realms/RepeatedNarrator (26.3 client jar): the constructor takes a Duration and stores permitsPerSecond = 1000 / duration.toMillis(); narrate(GameNarrator, Component) swaps in a new Params holding a fresh Guava RateLimiter when the text changed, then says the text with GameNarrator.saySystemNow only if rateLimiter.tryAcquire(1). So the method adds no narration text of its own: it is a repeat gate on one system message.
  • Its only caller in the 26.3 client is com.mojang.realmsclient.gui.screens.RealmsLongRunningMcoTaskScreen.tick (the <init> caller is that class's <clinit>, which also builds the period), so nothing outside the Realms client uses it.
  • Horizon has no Realms client: the title screen draws its Realms button inactive (title.rs:1689-1695, the false active flag), and the Realms rows in this same file are already skip:service (RealmsConnect.connect, .abort, .tick). There is no RepeatedNarrator anywhere under crates/.
  • What it leans on is ported: GameNarrator::say_system_now is crates/horizon-narrator/src/lib.rs:142-151. Horizon also repeats a screen's narration (ScreenInfo::repeat_every, widgets.rs:318; the check is in ScreenNarrator::step, screen_narrator.rs:729-734, reached from frame at :587, and LevelLoadingScreen uses it for its 2 s), but that is Screen's repeat of what changed, not this class's permit-per-period gate on one message.

map-check (run from the branch, the same command as the file's other checks):

$ PORT_LEDGER_OUT=/tmp/pledger-n1 python3 tools/port_ledger.py map-check tools/port_map/rest-012.tsv
tools/port_map/rest-012.tsv:25 ClientboundAddTransientBlockPacket.write: no fn crates/horizon-client/src/game/remote.rs: C::AddTransientBlock => add_transient_block
tools/port_map/rest-012.tsv:28 ClientboundBlockEntityDataPacket.create: no fn crates/horizon-client/src/game/command_blocks.rs:952 + game/decorated_pot.rs
tools/port_map/rest-012.tsv:85 ClientboundSetPlayerTeamPacket.createAddOrModifyPacket: no fn crates/horizon-client/src/lan/scoreboard.rs:124
tools/port_map/rest-012.tsv:86 ClientboundSetPlayerTeamPacket.createPlayerPacket: no fn crates/horizon-client/src/lan/scoreboard.rs

Those four rows are untouched here and fail the same way on upstream/main: their where cells hold prose and line numbers instead of file::fn, which map-check cannot resolve. The corrected row is not among them.

Proven: the class is a Realms-only helper — its sole 26.3 caller is RealmsLongRunningMcoTaskScreen.tick; its body reads as a rate limiter around saySystemNow (fields and bytecode above); Horizon does not offer Realms (the Realms button drawn inactive, the neighbouring Realms rows already skip:service) and nothing under crates/ implements RepeatedNarrator. skip:service is the verdict this map already uses for the Realms client's other methods, so the row no longer claims the narrator is the reason.

Not proven: that Horizon will never grow a Realms client — the row is a judgement that follows the rest of the map, not a fact about the code. The 26.3 client jar was read, not run, so the rate limiter's behaviour (one message per period, a fresh limiter per new text) is taken from the bytecode, and no Horizon behaviour is exercised by this row since the code it names does not exist here. map-check still reports the four unrelated rows above; they were failing before this change and are left alone.


🔄 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/7099 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/narrator-rest-012` --- ### 📝 Commits (1) - [`bee28cd`](https://github.com/horizon-rust/horizon/commit/bee28cddb61ee50a00e298184e35eec77dc8c9d3) Port ledger: RepeatedNarrator.narrate is Realms-only ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-012.tsv` (+1 -1) </details> ### 📄 Description Corrects one stale row in `tools/port_map/rest-012.tsv`, checked against `upstream/main` (26.3). | row | was | now | | --- | --- | --- | | `RepeatedNarrator.narrate` | `skip:other` — "accessibility narration; Horizon has no narrator" | `skip:service` — the Realms long-running task screen's rate-limited system narration | Citations: - `net/minecraft/realms/RepeatedNarrator` (26.3 client jar): the constructor takes a `Duration` and stores `permitsPerSecond = 1000 / duration.toMillis()`; `narrate(GameNarrator, Component)` swaps in a new `Params` holding a fresh Guava `RateLimiter` when the text changed, then says the text with `GameNarrator.saySystemNow` only if `rateLimiter.tryAcquire(1)`. So the method adds no narration text of its own: it is a repeat gate on one system message. - Its only caller in the 26.3 client is `com.mojang.realmsclient.gui.screens.RealmsLongRunningMcoTaskScreen.tick` (the `<init>` caller is that class's `<clinit>`, which also builds the period), so nothing outside the Realms client uses it. - Horizon has no Realms client: the title screen draws its Realms button inactive (`title.rs:1689-1695`, the `false` active flag), and the Realms rows in this same file are already `skip:service` (`RealmsConnect.connect`, `.abort`, `.tick`). There is no `RepeatedNarrator` anywhere under `crates/`. - What it leans on is ported: `GameNarrator::say_system_now` is `crates/horizon-narrator/src/lib.rs:142-151`. Horizon also repeats a screen's narration (`ScreenInfo::repeat_every`, `widgets.rs:318`; the check is in `ScreenNarrator::step`, `screen_narrator.rs:729-734`, reached from `frame` at `:587`, and `LevelLoadingScreen` uses it for its 2 s), but that is `Screen`'s repeat of what changed, not this class's permit-per-period gate on one message. map-check (run from the branch, the same command as the file's other checks): ``` $ PORT_LEDGER_OUT=/tmp/pledger-n1 python3 tools/port_ledger.py map-check tools/port_map/rest-012.tsv tools/port_map/rest-012.tsv:25 ClientboundAddTransientBlockPacket.write: no fn crates/horizon-client/src/game/remote.rs: C::AddTransientBlock => add_transient_block tools/port_map/rest-012.tsv:28 ClientboundBlockEntityDataPacket.create: no fn crates/horizon-client/src/game/command_blocks.rs:952 + game/decorated_pot.rs tools/port_map/rest-012.tsv:85 ClientboundSetPlayerTeamPacket.createAddOrModifyPacket: no fn crates/horizon-client/src/lan/scoreboard.rs:124 tools/port_map/rest-012.tsv:86 ClientboundSetPlayerTeamPacket.createPlayerPacket: no fn crates/horizon-client/src/lan/scoreboard.rs ``` Those four rows are untouched here and fail the same way on `upstream/main`: their `where` cells hold prose and line numbers instead of `file::fn`, which `map-check` cannot resolve. The corrected row is not among them. **Proven:** the class is a Realms-only helper — its sole 26.3 caller is `RealmsLongRunningMcoTaskScreen.tick`; its body reads as a rate limiter around `saySystemNow` (fields and bytecode above); Horizon does not offer Realms (the Realms button drawn inactive, the neighbouring Realms rows already `skip:service`) and nothing under `crates/` implements `RepeatedNarrator`. `skip:service` is the verdict this map already uses for the Realms client's other methods, so the row no longer claims the narrator is the reason. **Not proven:** that Horizon will never grow a Realms client — the row is a judgement that follows the rest of the map, not a fact about the code. The 26.3 client jar was read, not run, so the rate limiter's behaviour (one message per period, a fresh limiter per new text) is taken from the bytecode, and no Horizon behaviour is exercised by this row since the code it names does not exist here. `map-check` still reports the four unrelated rows above; they were failing before this change and are left alone. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:37:57 +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#7337
No description provided.