[PR #7324] [MERGED] Port map: two PackFormat rows main already ports, and the ban entry constructor #7494

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

📋 Pull Request Information

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

Base: main ← Head: chore/vol-d-rest-019


📝 Commits (2)

  • cdf6205 port map: two PackFormat rows main already ports
  • 86ad0cd port map: the ban entry constructor is BanEntry::new

📊 Changes

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

View changed files

📝 tools/port_map/rest-019.tsv (+3 -2)

📄 Description

Rows of tools/port_map/rest-019.tsv (119 rows, map-check clean against 26.3): pack formats and the pack repository, the fallback resource manager, permissions, and the server's ban and user-cache files.

Rows

  • PackFormat.fullCodec — skip:java → port crates/horizon-client-render/src/packs.rs::format_codec. It was filed as plumbing ("packs.rs::compatible reads the same array"), but format_codec opens with /// `PackFormat.fullCodec(default_minor)` and is that codec: an int, or a list of 1 to 256 non-negative ints whose second element is the minor. The ledger already listed the method as ported through that citation.
  • PackFormat.lastPreMinorVersion — inline → port crates/horizon-client-render/src/packs.rs::last_pre_minor. last_pre_minor is not a step inside a larger function; it is the method (81 for data packs, 64 for resource packs), which is how its four IntermediaryFormat neighbours are already filed.
  • BanListEntry.<init> — added, port crates/horizon-server-files/src/user_lists.rs::BanEntry::new. The batch maps the rest of BanListEntry (equals, createIpInfo, serialize, parseDate), but left the constructor unanswered, so the ledger counted it missing. Both vanilla constructors land in BanEntry::new; a missing source becomes (Unknown). Difference worth recording: vanilla takes the created date as an argument, Horizon stamps now_millis() — a file's stored date comes back through fields(), which from_json uses.

Checked and left alone, since each one holds at this commit:

  • PackRepository.reload → game/packs.rs::Game::refresh_pack_lists is the closest function (it rebuilds pack_infos from the sources through pack_infos/packs::discover and resets the selection from the settings), even though its doc does not cite the method; no better match exists in the tree.
  • OldUsersConverter's ten rows stay missing, not skip:server: Horizon has a dedicated server, so the pre-1.7 flat-list conversion (banned-players.txt, ops.txt, whitelist.txt, world/players → playerdata) is behaviour it lacks rather than tooling it does not need. Their callers are DedicatedServer.initServer/convertOldUsers and the list converters themselves, not datagen.

Map-check:

PORT_LEDGER_OUT=... python3 tools/port_ledger.py map-check tools/port_map/rest-019.tsv
119 rows, no problems.

Proven: all three rows; format_codec and last_pre_minor are read in crates/horizon-client-render/src/packs.rs at this commit, and BanEntry::new/fields in crates/horizon-server-files/src/user_lists.rs. refresh_pack_lists is read too, and the OldUsersConverter callers come from the ledger's call edges for the pinned 26.3 client and server jars.

Not proven: no gameplay verdict changes here — the two flips record code that already exists under a different verdict, and the added row closes a hole rather than filling it. I did not check the PackFormat validation rows' behaviour in a running client, and the OldUsersConverter rows were judged from their callers and notes, not by starting a server on a pre-1.7 world.


🔄 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/7324 **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-d-rest-019` --- ### 📝 Commits (2) - [`cdf6205`](https://github.com/horizon-rust/horizon/commit/cdf62054cef34b1050d6afbcc8187ead5cf657db) port map: two PackFormat rows main already ports - [`86ad0cd`](https://github.com/horizon-rust/horizon/commit/86ad0cde9fcd858864ab04367e9fd97f068fb47c) port map: the ban entry constructor is BanEntry::new ### 📊 Changes **1 file changed** (+3 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-019.tsv` (+3 -2) </details> ### 📄 Description Rows of `tools/port_map/rest-019.tsv` (119 rows, map-check clean against 26.3): pack formats and the pack repository, the fallback resource manager, permissions, and the server's ban and user-cache files. **Rows** - `PackFormat.fullCodec` — `skip:java` → `port crates/horizon-client-render/src/packs.rs::format_codec`. It was filed as plumbing ("packs.rs::compatible reads the same array"), but `format_codec` opens with `` /// `PackFormat.fullCodec(default_minor)` `` and is that codec: an int, or a list of 1 to 256 non-negative ints whose second element is the minor. The ledger already listed the method as ported through that citation. - `PackFormat.lastPreMinorVersion` — `inline` → `port crates/horizon-client-render/src/packs.rs::last_pre_minor`. `last_pre_minor` is not a step inside a larger function; it *is* the method (81 for data packs, 64 for resource packs), which is how its four `IntermediaryFormat` neighbours are already filed. - `BanListEntry.<init>` — added, `port crates/horizon-server-files/src/user_lists.rs::BanEntry::new`. The batch maps the rest of `BanListEntry` (`equals`, `createIpInfo`, `serialize`, `parseDate`), but left the constructor unanswered, so the ledger counted it `missing`. Both vanilla constructors land in `BanEntry::new`; a missing source becomes `(Unknown)`. Difference worth recording: vanilla takes the `created` date as an argument, Horizon stamps `now_millis()` — a file's stored date comes back through `fields()`, which `from_json` uses. Checked and left alone, since each one holds at this commit: - `PackRepository.reload` → `game/packs.rs::Game::refresh_pack_lists` is the closest function (it rebuilds `pack_infos` from the sources through `pack_infos`/`packs::discover` and resets the selection from the settings), even though its doc does not cite the method; no better match exists in the tree. - `OldUsersConverter`'s ten rows stay `missing`, not `skip:server`: Horizon has a dedicated server, so the pre-1.7 flat-list conversion (`banned-players.txt`, `ops.txt`, `whitelist.txt`, `world/players` → `playerdata`) is behaviour it lacks rather than tooling it does not need. Their callers are `DedicatedServer.initServer`/`convertOldUsers` and the list converters themselves, not datagen. Map-check: ``` PORT_LEDGER_OUT=... python3 tools/port_ledger.py map-check tools/port_map/rest-019.tsv 119 rows, no problems. ``` **Proven:** all three rows; `format_codec` and `last_pre_minor` are read in `crates/horizon-client-render/src/packs.rs` at this commit, and `BanEntry::new`/`fields` in `crates/horizon-server-files/src/user_lists.rs`. `refresh_pack_lists` is read too, and the `OldUsersConverter` callers come from the ledger's call edges for the pinned 26.3 client and server jars. **Not proven:** no gameplay verdict changes here — the two flips record code that already exists under a different verdict, and the added row closes a hole rather than filling it. I did not check the `PackFormat` validation rows' behaviour in a running client, and the `OldUsersConverter` rows were judged from their callers and notes, not by starting a server on a pre-1.7 world. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:40:08 +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#7494
No description provided.