[PR #1912] [CLOSED] End city banners keep their template patterns #3858

Closed
opened 2026-11-03 04:12:49 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1912
Author: @vlesmentie
Created: 10/25/2026
Status: ❌ Closed

Base: main ← Head: fix/structure-banner-patterns


📝 Commits (1)

  • 0d575e1 End city banners keep their template patterns

📊 Changes

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

View changed files

📝 crates/horizon-client/src/structure_blocks.rs (+45 -10)

📄 Description

🤖 Opened by vlesmentie's AI agent (Claude Code, Claude Opus 5.5), not by vlesmentie themselves.

What and why

Fixes #1438.

The banners on End city towers came out plain magenta. Their templates carry the pattern: every wall banner in
end_city/tower_top.nbt has patterns: [{color: "black", pattern: "minecraft:triangle_top"}, {color: "black", pattern: "minecraft:triangle_bottom"}] (read from the 26.3 jar's template). But structure_blocks::block_entities
created each banner's block entity empty and loaded only spawners, trial spawners and vaults from the template NBT,
so the patterns were dropped.

That loading is now load_placed_nbt, one match over the block entity, and it reads a banner's patterns with the
existing banner::layers_from_nbt (the same reader save.rs uses for saved banners). Spawners, trial spawners and
vaults load exactly as before.

Not #526: that is the ominous banner item losing its patterns when a player places it, a different path.

Vanilla reference

  • StructureTemplate.placeInWorld: each block's template nbt goes to its block entity
    (BlockEntity.loadWithComponents)
  • BannerBlockEntity.loadAdditional: patterns (BannerPatternLayers.CODEC)
  • end_city/tower_top.nbt (DataVersion 5023): the eight magenta wall banners above

Checked against the 26.3 client jar (javap and the template NBT).

New test structure_blocks::tests::placed_banners_keep_their_template_patterns: a magenta wall banner given
tower_top.nbt's data ends up with its two layers.

Self-check

pr_ready (tools/pr_ready.py on debian, against origin/main at 478b8c19c, 1 min 8 s)

Check Result
Scope ✅ 1 files, +45 −10
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (16 s)
clippy ✅
tests: horizon-client ❌ 1101 passed, 2 failed (46 s)
doc tests ✅ 0 passed (3 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The two failing tests, packs::cache::tests::zip_content_and_failed_build_invalidate and
packs::cache::tests::normalized_and_external_overlay_roots_keep_merged_bytes_current, fail the same way on main
on this machine and come and go between runs here (they passed in #1897's run); CI's verify passes them. They
don't touch anything this PR changes.

Not checked in game.

🤖 Generated with Claude Code


🔄 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/1912 **Author:** [@vlesmentie](https://github.com/vlesmentie) **Created:** 10/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/structure-banner-patterns` --- ### 📝 Commits (1) - [`0d575e1`](https://github.com/horizon-rust/horizon/commit/0d575e129b75bffa0da34be253deaf5cbb06ecf6) End city banners keep their template patterns ### 📊 Changes **1 file changed** (+45 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/structure_blocks.rs` (+45 -10) </details> ### 📄 Description > 🤖 Opened by vlesmentie's AI agent (Claude Code, Claude Opus 5.5), not by vlesmentie themselves. ## What and why Fixes #1438. The banners on End city towers came out plain magenta. Their templates carry the pattern: every wall banner in `end_city/tower_top.nbt` has `patterns: [{color: "black", pattern: "minecraft:triangle_top"}, {color: "black", pattern: "minecraft:triangle_bottom"}]` (read from the 26.3 jar's template). But `structure_blocks::block_entities` created each banner's block entity empty and loaded only spawners, trial spawners and vaults from the template NBT, so the patterns were dropped. That loading is now `load_placed_nbt`, one match over the block entity, and it reads a banner's `patterns` with the existing `banner::layers_from_nbt` (the same reader `save.rs` uses for saved banners). Spawners, trial spawners and vaults load exactly as before. Not #526: that is the ominous banner item losing its patterns when a player places it, a different path. ## Vanilla reference - `StructureTemplate.placeInWorld`: each block's template `nbt` goes to its block entity (`BlockEntity.loadWithComponents`) - `BannerBlockEntity.loadAdditional`: `patterns` (`BannerPatternLayers.CODEC`) - `end_city/tower_top.nbt` (DataVersion 5023): the eight magenta wall banners above Checked against the 26.3 client jar (`javap` and the template NBT). New test `structure_blocks::tests::placed_banners_keep_their_template_patterns`: a magenta wall banner given `tower_top.nbt`'s data ends up with its two layers. ## Self-check **pr_ready** (`tools/pr_ready.py` on debian, against origin/main at 478b8c19c, 1 min 8 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +45 −10 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (16 s) | | clippy | ✅ | | tests: horizon-client | ❌ 1101 passed, 2 failed (46 s) | | doc tests | ✅ 0 passed (3 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The two failing tests, `packs::cache::tests::zip_content_and_failed_build_invalidate` and `packs::cache::tests::normalized_and_external_overlay_roots_keep_merged_bytes_current`, fail the same way on `main` on this machine and come and go between runs here (they passed in #1897's run); CI's `verify` passes them. They don't touch anything this PR changes. Not checked in game. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:12:49 +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#3858
No description provided.