Skip to content

支持渲染.snbt结构文件#5

Merged
Gu-ZT merged 3 commits into
Anvil-Dev:releases/1.21.1from
TBPig:pig/1.21.1
May 8, 2026
Merged

支持渲染.snbt结构文件#5
Gu-ZT merged 3 commits into
Anvil-Dev:releases/1.21.1from
TBPig:pig/1.21.1

Conversation

@TBPig

@TBPig TBPig commented May 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for rendering structure files provided as .snbt (SNBT) in the <structure/> markdown component, and updates the bundled docs/examples to demonstrate the new capability.

Changes:

  • Extend MDNBTStructureComponent to load structure content from either compressed NBT or SNBT, and normalize a simplified SNBT structure format into vanilla StructureTemplate NBT.
  • Expand structure file resolution to try both .nbt and .snbt variants when an extension is not explicitly provided.
  • Add .snbt sample files and update Chinese/English docs/README examples to reference them.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/main/resources/assets/ageratum/ageratum/zh_cn/test.snbt Adds a Chinese SNBT structure example for the guide.
src/main/resources/assets/ageratum/ageratum/zh_cn/index.md References the new test.snbt example in the zh_cn guide index.
src/main/resources/assets/ageratum/ageratum/en_us/test.snbt Adds an English SNBT structure example for the guide.
src/main/resources/assets/ageratum/ageratum/en_us/index.md References the new test.snbt example in the en_us guide index.
src/main/java/dev/anvilcraft/resource/ageratum/client/feat/markdown/component/extend/MDNBTStructureComponent.java Implements SNBT parsing + simplified-format normalization; expands .nbt/.snbt resolution.
README.md Documents .snbt support for the <structure/> component (Chinese).
README.en.md Documents .snbt support for the <structure/> component (English).
docs/zh/10-structure-preview-rendering.md Updates rendering pipeline documentation to include SNBT.
docs/zh/03-markdown-syntax.md Updates syntax docs/examples to include .snbt.
docs/en/10-structure-preview-rendering.md Updates rendering pipeline documentation to include SNBT.
docs/en/03-markdown-syntax.md Updates syntax docs/examples to include .snbt.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Gu-ZT Gu-ZT merged commit 189d44b into Anvil-Dev:releases/1.21.1 May 8, 2026
1 check passed
Gu-ZT added a commit that referenced this pull request May 8, 2026
* feat(structure): 支持渲染.snbt文件

* feat(structure): enhance structure loading with improved parsing and error handling

* refactor(MDNBTStructureComponent): streamline method signatures and enhance readability

---------

Co-authored-by: Gugle <administration@ztxy666.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants