Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances schematic (Litematic) file management by extracting detailed metadata, adding localization for schematics folders, and updating the UI to expose schematics in the version page.
- Extract multiple metadata fields (preview image, name, author, timestamps, block/volume counts, enclosure size) and region count in LitematicFile
- Add “folder.schematics” entries to English and Chinese resource bundles
- Include a “Schematics” item in the VersionPage browse menu
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| HMCLCore/src/main/java/org/jackhuang/hmcl/schematic/LitematicFile.java | Refactored constructor to pull out metadata fields and region count; replaced on-the-fly tag lookups in getters |
| HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties | Added Simplified Chinese key for schematics folder |
| HMCL/src/main/resources/assets/lang/I18N_zh.properties | Added Traditional Chinese key for schematics folder |
| HMCL/src/main/resources/assets/lang/I18N.properties | Added English key for schematics folder |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/VersionPage.java | Added “Schematics” menu item to version page browse menu |
Comments suppressed due to low confidence (3)
HMCLCore/src/main/java/org/jackhuang/hmcl/schematic/LitematicFile.java:110
- The local variable
previewImageDatashadows the class field of the same name. Consider renaming the local tag variable topreviewImageTagfor clarity.
Tag previewImageData = metadata.get("PreviewImageData");
HMCLCore/src/main/java/org/jackhuang/hmcl/schematic/LitematicFile.java:124
- The local variable
enclosingSizeshadows the class field. Rename it to something likelocalEnclosingSizeto avoid confusion.
Point3D enclosingSize = null;
HMCLCore/src/main/java/org/jackhuang/hmcl/schematic/LitematicFile.java:143
- There are several new getters (e.g., getVersion, getRegionCount, getEnclosingSize) and parsing paths; consider adding unit tests to verify metadata extraction and default behaviors.
public int getVersion() {
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.