[PR #6855] [MERGED] Port map: a structure block keeps its author, as setPlacedBy writes it #7147

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

📋 Pull Request Information

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

Base: main ← Head: fix/ledger-game2016-author


📝 Commits (1)

  • f064947 port map: a structure block keeps its author, as setPlacedBy writes it

📊 Changes

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

View changed files

📝 tools/port_map/game2-016.tsv (+1 -1)

📄 Description

StructureBlock.setPlacedBy stores the placing entity as the structure block entity's author, so a structure saved from that block is credited to the player who placed it.

tools/port_map/game2-016.tsv said it was missing: "minor: the placer is not stored as the structure block's author."

The tree does store it. Game::place_item_block runs the Block.setPlacedBy match after apply_placed_item (crates/horizon-client/src/game.rs:6377-6389), whose BlockEntity::StructureBlock arm calls structure_block_placed (crates/horizon-client/src/game/structure_blocks.rs:133), and that sets b.author to the acting guest's name on a LAN world or to the local player's name — vanilla's placer.

Proven:

  • python3 tools/port_ledger.py map-check tools/port_map/game2-016.tsv → 150 rows, no problems.
  • grep -n 'StructureBlock.setPlacedBy' crates/horizon-client/src/game/structure_blocks.rs → 131: /// \StructureBlock.setPlacedBy`: the placing player is the author., over fn structure_block_placedat:133, which writes b.author = author`
  • grep -n 'Some(BlockEntity::StructureBlock(_))' crates/horizon-client/src/game.rs → the setPlacedBy dispatch arm that calls it

Not proven:

  • I did not run the game: no structure block was placed and saved to see the author field on screen or in the saved .nbt.
  • The other rows of game2-016.tsv were not re-derived method by method; the verdicts I left alone were checked only for dangling paths, which map-check reports clean.

🔄 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/6855 **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:** `fix/ledger-game2016-author` --- ### 📝 Commits (1) - [`f064947`](https://github.com/horizon-rust/horizon/commit/f0649477b666035580c32e9d27af308cf560a5a6) port map: a structure block keeps its author, as setPlacedBy writes it ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/game2-016.tsv` (+1 -1) </details> ### 📄 Description `StructureBlock.setPlacedBy` stores the placing entity as the structure block entity's author, so a structure saved from that block is credited to the player who placed it. `tools/port_map/game2-016.tsv` said it was missing: "minor: the placer is not stored as the structure block's author." The tree does store it. `Game::place_item_block` runs the `Block.setPlacedBy` match after `apply_placed_item` (`crates/horizon-client/src/game.rs:6377-6389`), whose `BlockEntity::StructureBlock` arm calls `structure_block_placed` (`crates/horizon-client/src/game/structure_blocks.rs:133`), and that sets `b.author` to the acting guest's name on a LAN world or to the local player's name — vanilla's `placer`. **Proven:** - `python3 tools/port_ledger.py map-check tools/port_map/game2-016.tsv` → `150 rows, no problems.` - `grep -n 'StructureBlock.setPlacedBy' crates/horizon-client/src/game/structure_blocks.rs` → `131: /// \`StructureBlock.setPlacedBy\`: the placing player is the author.`, over `fn structure_block_placed` at `:133`, which writes `b.author = author` - `grep -n 'Some(BlockEntity::StructureBlock(_))' crates/horizon-client/src/game.rs` → the `setPlacedBy` dispatch arm that calls it **Not proven:** - I did not run the game: no structure block was placed and saved to see the author field on screen or in the saved `.nbt`. - The other rows of `game2-016.tsv` were not re-derived method by method; the verdicts I left alone were checked only for dangling paths, which `map-check` reports clean. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:34:48 +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#7147
No description provided.