支持渲染.snbt结构文件#5
Merged
Merged
Conversation
There was a problem hiding this comment.
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
MDNBTStructureComponentto load structure content from either compressed NBT or SNBT, and normalize a simplified SNBT structure format into vanillaStructureTemplateNBT. - Expand structure file resolution to try both
.nbtand.snbtvariants when an extension is not explicitly provided. - Add
.snbtsample 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.
…nhance readability
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.