[PR #7373] [MERGED] Port map: four rest-016 methods the file never answered #7560

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

📋 Pull Request Information

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

Base: main ← Head: chore/vol-e-rest-016


📝 Commits (1)

  • 985fd6e Port map: four rest-016 methods the file never answered

📊 Changes

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

View changed files

📝 tools/port_map/rest-016.tsv (+4 -0)

📄 Description

Rows of tools/port_map/rest-016.tsv (123 rows before this change, 127 after, map-check clean against 26.3). Four methods the file never answered have rows; all four are answered by functions that name the vanilla method in their own doc.

Rows added

row verdict where
SpreadPlayersCommand.Position.getSpawnY port crates/horizon-client/src/game/commands/world_cmds.rs::Game::spread_spawn_y
SpreadPlayersCommand.Position.isSafe port crates/horizon-client/src/game/commands/world_cmds.rs::Game::spread_safe
StopSoundCommand.stopSound inline crates/horizon-client/src/game/commands/world_cmds.rs::Game::cmd_stopsound
StopwatchCommand.register port crates/horizon-command/src/tree_misc.rs::stopwatch
  • spread_spawn_y (world_cmds.rs:1547) walks down from max_y looking for the first solid block under two air blocks and returns max_y + 1 when it finds none — Position.getSpawnY.
  • spread_safe (world_cmds.rs:1572) takes that spawn y minus one and asks for a non-liquid block in the entities_can_teleport_to tag below max_y — Position.isSafe.
  • cmd_stopsound (world_cmds.rs:423) builds the StopSound packet once and sends it to each selected target's connection; the local player's own sounds stop through Audio::stop_sounds, since the host has no connection to send to. That is StopSoundCommand.stopSound folded into the command.
  • tree_misc.rs::stopwatch (tree_misc.rs:293) registers stopwatch create|query|restart|remove, which is StopwatchCommand.register; the four arms already have rows.

Map-check:

PORT_LEDGER_OUT=/tmp/led-volE python3 tools/port_ledger.py map-check tools/port_map/rest-016.tsv
127 rows, no problems.

Proven: the Horizon side at the cites — spread_spawn_y's three-block air test and its max_y + 1 fallback, spread_safe's liquid and block-tag tests, cmd_stopsound's packet-per-target loop, and tree_misc.rs::stopwatch's four d.executes calls — plus each function's doc naming the vanilla method. Every where cell resolves under map-check.

Not proven: that the search bottoms out the same way at the world floor — spread_spawn_y compares against world.bottom_y() where vanilla compares pos.getY() > level.getMinY(), and I did not run a spread over a column that reaches it. I also did not check /stopsound against a real client to see the packet reach a guest.


🔄 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/7373 **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/vol-e-rest-016` --- ### 📝 Commits (1) - [`985fd6e`](https://github.com/horizon-rust/horizon/commit/985fd6e8f03cce48ccd251450fa8ed093092ae0e) Port map: four rest-016 methods the file never answered ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-016.tsv` (+4 -0) </details> ### 📄 Description Rows of `tools/port_map/rest-016.tsv` (123 rows before this change, 127 after, map-check clean against 26.3). Four methods the file never answered have rows; all four are answered by functions that name the vanilla method in their own doc. **Rows added** | row | verdict | where | | --- | --- | --- | | `SpreadPlayersCommand.Position.getSpawnY` | port | `crates/horizon-client/src/game/commands/world_cmds.rs::Game::spread_spawn_y` | | `SpreadPlayersCommand.Position.isSafe` | port | `crates/horizon-client/src/game/commands/world_cmds.rs::Game::spread_safe` | | `StopSoundCommand.stopSound` | inline | `crates/horizon-client/src/game/commands/world_cmds.rs::Game::cmd_stopsound` | | `StopwatchCommand.register` | port | `crates/horizon-command/src/tree_misc.rs::stopwatch` | - `spread_spawn_y` (world_cmds.rs:1547) walks down from `max_y` looking for the first solid block under two air blocks and returns `max_y + 1` when it finds none — `Position.getSpawnY`. - `spread_safe` (world_cmds.rs:1572) takes that spawn y minus one and asks for a non-liquid block in the `entities_can_teleport_to` tag below `max_y` — `Position.isSafe`. - `cmd_stopsound` (world_cmds.rs:423) builds the `StopSound` packet once and sends it to each selected target's connection; the local player's own sounds stop through `Audio::stop_sounds`, since the host has no connection to send to. That is `StopSoundCommand.stopSound` folded into the command. - `tree_misc.rs::stopwatch` (tree_misc.rs:293) registers `stopwatch create|query|restart|remove`, which is `StopwatchCommand.register`; the four arms already have rows. Map-check: ``` PORT_LEDGER_OUT=/tmp/led-volE python3 tools/port_ledger.py map-check tools/port_map/rest-016.tsv 127 rows, no problems. ``` **Proven:** the Horizon side at the cites — `spread_spawn_y`'s three-block air test and its `max_y + 1` fallback, `spread_safe`'s liquid and block-tag tests, `cmd_stopsound`'s packet-per-target loop, and `tree_misc.rs::stopwatch`'s four `d.executes` calls — plus each function's doc naming the vanilla method. Every `where` cell resolves under map-check. **Not proven:** that the search bottoms out the same way at the world floor — `spread_spawn_y` compares against `world.bottom_y()` where vanilla compares `pos.getY() > level.getMinY()`, and I did not run a spread over a column that reaches it. I also did not check `/stopsound` against a real client to see the packet reach a guest. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:19:47 +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#7560
No description provided.