[PR #7035] [MERGED] Clear stale game2-022.tsv structure template save rows #7284

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

📋 Pull Request Information

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

Base: main ← Head: chore/ledger-game2-022-v


📝 Commits (2)

📊 Changes

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

View changed files

📝 tools/port_map/game2-022.tsv (+4 -4)

📄 Description

Rows in tools/port_map/game2-022.tsv whose verdict was missing but whose behaviour main already has: saving a structure template from the world.

row verdict citation
StructureTemplate.fillFromWorld port crates/horizon-client/src/game/structure_blocks.rs::Game::template_from_world
StructureTemplate.fillEntityList port crates/horizon-client/src/game/structure_blocks.rs::Game::template_entities
StructureTemplate.SimplePalette.idFor inline crates/horizon-world/src/worldgen/structure/template.rs::save_nbt
StructureTemplateManager.save port crates/horizon-client/src/game/structure_blocks.rs::Game::write_template
  • fillFromWorld: template_from_world walks the box at the origin, skips structure voids (and air when the save asks for it), keeps each block's state and its block entity's data without the position keys, then takes the entities when they were asked for.
  • fillEntityList: template_entities collects the entity NBT of the chunks the box covers and keeps the entities whose Pos falls inside it, at positions relative to the box's minimum corner, with the UUID removed.
  • SimplePalette.idFor: the save hands out palette ids in first-use order and appends a state the palette does not hold yet - save_nbt's palette loop, which is why it is inline rather than a function of its own.
  • StructureTemplateManager.save: write_template writes the tree gzipped to <world>/generated/<namespace>/structures/<path>.nbt, refusing a path with empty, . or .. segments.

The rows around them are unchanged. In particular the file's fifth missing row, OceanRuinPieces.OceanRuinPiece.create, was re-read and stands: simple.rs::TemplatePiece::saved writes a ruin piece's BiomeType, IsLarge, Integrity and Rot, but no code reads a saved piece back, so create has no port.

Proven: every cited function is in the tree at the row's file::fn - git grep finds fn template_from_world, fn template_entities and fn write_template in crates/horizon-client/src/game/structure_blocks.rs (each one's doc comment names the vanilla method it ports) and pub fn save_nbt in crates/horizon-world/src/worldgen/structure/template.rs; template_from_world calls save_nbt, so the save path is wired end to end. map-check deferred, build VM in cooldown - the box is cooling down until 10:55Z, so PORT_LEDGER_OUT=/tmp/led-game2-022 python3 tools/port_ledger.py build --jar .../client.jar --jar .../server.jar && python3 tools/port_ledger.py map-check tools/port_map/game2-022.tsv is re-run and reported here as soon as it answers.

Not proven: the map-check line count for this file; the bytecode of StructureTemplate.SimplePalette.idFor was not re-read on this pass (the tree's own save_nbt doc states the first-use palette order it implements).


🔄 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/7035 **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/ledger-game2-022-v` --- ### 📝 Commits (2) - [`ff96d75`](https://github.com/horizon-rust/horizon/commit/ff96d75abe5317a04b32a9fb8efb38733fa239b3) port map: game2-022 template save rows - [`a42361a`](https://github.com/horizon-rust/horizon/commit/a42361a56b095c270c8e8f457e21d0864a9e3c0a) Merge main into #7035 ### 📊 Changes **1 file changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/game2-022.tsv` (+4 -4) </details> ### 📄 Description Rows in `tools/port_map/game2-022.tsv` whose verdict was `missing` but whose behaviour `main` already has: saving a structure template from the world. | row | verdict | citation | | --- | --- | --- | | `StructureTemplate.fillFromWorld` | `port` | `crates/horizon-client/src/game/structure_blocks.rs::Game::template_from_world` | | `StructureTemplate.fillEntityList` | `port` | `crates/horizon-client/src/game/structure_blocks.rs::Game::template_entities` | | `StructureTemplate.SimplePalette.idFor` | `inline` | `crates/horizon-world/src/worldgen/structure/template.rs::save_nbt` | | `StructureTemplateManager.save` | `port` | `crates/horizon-client/src/game/structure_blocks.rs::Game::write_template` | - `fillFromWorld`: `template_from_world` walks the box at the origin, skips structure voids (and air when the save asks for it), keeps each block's state and its block entity's data without the position keys, then takes the entities when they were asked for. - `fillEntityList`: `template_entities` collects the entity NBT of the chunks the box covers and keeps the entities whose `Pos` falls inside it, at positions relative to the box's minimum corner, with the UUID removed. - `SimplePalette.idFor`: the save hands out palette ids in first-use order and appends a state the palette does not hold yet - `save_nbt`'s palette loop, which is why it is `inline` rather than a function of its own. - `StructureTemplateManager.save`: `write_template` writes the tree gzipped to `<world>/generated/<namespace>/structures/<path>.nbt`, refusing a path with empty, `.` or `..` segments. The rows around them are unchanged. In particular the file's fifth `missing` row, `OceanRuinPieces.OceanRuinPiece.create`, was re-read and stands: `simple.rs::TemplatePiece::saved` writes a ruin piece's `BiomeType`, `IsLarge`, `Integrity` and `Rot`, but no code reads a saved piece back, so `create` has no port. **Proven:** every cited function is in the tree at the row's `file::fn` - `git grep` finds `fn template_from_world`, `fn template_entities` and `fn write_template` in `crates/horizon-client/src/game/structure_blocks.rs` (each one's doc comment names the vanilla method it ports) and `pub fn save_nbt` in `crates/horizon-world/src/worldgen/structure/template.rs`; `template_from_world` calls `save_nbt`, so the save path is wired end to end. map-check deferred, build VM in cooldown - the box is cooling down until 10:55Z, so `PORT_LEDGER_OUT=/tmp/led-game2-022 python3 tools/port_ledger.py build --jar .../client.jar --jar .../server.jar && python3 tools/port_ledger.py map-check tools/port_map/game2-022.tsv` is re-run and reported here as soon as it answers. **Not proven:** the map-check line count for this file; the bytecode of `StructureTemplate.SimplePalette.idFor` was not re-read on this pass (the tree's own `save_nbt` doc states the first-use palette order it implements). --- <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:05 +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#7284
No description provided.