Conversation
|
路径前面可以加个文本,例如 |
其实我是想做成文件管理器那种形式,一般是没有提示语的 我给路径末尾加个 |
👌 |
|
对于 1.16.5 及以上的 LexForge/NeoForge 实例,是否可以引导用户安装 Forgematica 而不是上游。 |
在做 |
There was a problem hiding this comment.
Pull request overview
This pull request enhances the schematic management functionality in HMCL with comprehensive improvements including:
Purpose: Modernize and expand schematic file support, add custom directory configuration, improve UI/UX with better navigation and warnings, and integrate NBT viewing capabilities.
Changes:
- Added support for multiple schematic formats (Litematic, NBT Structure, Schem/Schematic) beyond just Litematic files
- Implemented custom Litematica directory detection from configuration files
- Redesigned SchematicsPage UI with breadcrumb navigation, back button, warning messages for missing/disabled mods, and NBT viewer integration
- Refactored code to use a common Schematic base class with format-specific implementations
Reviewed changes
Copilot reviewed 28 out of 31 changed files in this pull request and generated 20 comments.
Show a summary per file
| File | Description |
|---|---|
| Vec3i.java | New record class for 3D integer vectors replacing JavaFX Point3D |
| SchematicType.java | Enum for schematic file type detection by extension |
| Schematic.java | Abstract base class for all schematic formats with common functionality |
| LitematicFile.java | Refactored to extend Schematic base class |
| SchemFile.java | New class supporting Schematica and Sponge Schem formats |
| NBTStructureFile.java | New class for vanilla NBT structure files |
| LitematicaConfig.java | Configuration model for reading Litematica custom directory settings |
| DefaultGameRepository.java | Added logic to read custom schematic directory from Litematica config |
| ModManager.java | Extracted supported loaders logic to be reusable |
| ModAdviser.java | Moved schematics from hidden to suggested list for modpack exports |
| SchematicsPage.java | Major UI refactoring with navigation improvements and warning system |
| NBTFileType.java | Added schematic file extensions to NBT file type support |
| I18N properties | Added localization strings for new UI elements across all languages |
| SchematicTest.java | Comprehensive tests for all schematic format loading |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
HMCLCore/src/main/java/org/jackhuang/hmcl/schematic/NBTStructureFile.java
Outdated
Show resolved
Hide resolved
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/SchematicsPage.java
Outdated
Show resolved
Hide resolved
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/SchematicsPage.java
Outdated
Show resolved
Hide resolved
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/SchematicsPage.java
Outdated
Show resolved
Hide resolved
HMCLCore/src/main/java/org/jackhuang/hmcl/schematic/NBTStructureFile.java
Outdated
Show resolved
Hide resolved
HMCLCore/src/main/java/org/jackhuang/hmcl/schematic/Schematic.java
Outdated
Show resolved
Hide resolved
# Conflicts: # HMCL/src/main/resources/assets/lang/I18N.properties # HMCL/src/main/resources/assets/lang/I18N_ar.properties # HMCL/src/main/resources/assets/lang/I18N_es.properties # HMCL/src/main/resources/assets/lang/I18N_ru.properties # HMCL/src/main/resources/assets/lang/I18N_uk.properties # HMCL/src/main/resources/assets/lang/I18N_zh.properties # HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties
|
@3gf8jv4dv 为啥要把非完全支持语言的 |
因为当时考虑到英文的译文改了,删了的意思是希望重新翻译。
|
哦哦哦,got it |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 29 out of 32 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
HMCLCore/src/main/java/org/jackhuang/hmcl/mod/ModManager.java:212
updateSupportedLoaders()is called before scanning the mods directory. The logic inside it depends onhasMod("kilt"...)/hasMod("connectormod"...), which won’t work until afteraddModInfo(...)populateslocalMods. This can makesupportedLoadersincomplete/incorrect.
Consider calling updateSupportedLoaders() after mods have been loaded (or call it twice: once for analyzer-only loader inference, then again after mod metadata is parsed).
public void refreshMods() throws IOException {
localModFiles.clear();
localMods.clear();
var resolved = getRepository().getResolvedPreservingPatchesVersion(id);
gameVersion = repository.getGameVersion(resolved).orElse(null);
analyzer = LibraryAnalyzer.analyze(resolved, gameVersion);
updateSupportedLoaders();
boolean supportSubfolders = analyzer.has(LibraryAnalyzer.LibraryType.FORGE)
|| analyzer.has(LibraryAnalyzer.LibraryType.QUILT);
if (Files.isDirectory(getModsDirectory())) {
try (DirectoryStream<Path> modsDirectoryStream = Files.newDirectoryStream(getModsDirectory())) {
for (Path subitem : modsDirectoryStream) {
if (supportSubfolders && Files.isDirectory(subitem) && !".connector".equalsIgnoreCase(subitem.getFileName().toString())) {
try (DirectoryStream<Path> subitemDirectoryStream = Files.newDirectoryStream(subitem)) {
for (Path subsubitem : subitemDirectoryStream) {
addModInfo(subsubitem);
}
}
} else {
addModInfo(subitem);
}
}
}
}
loaded = true;
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/SchematicsPage.java
Outdated
Show resolved
Hide resolved
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/SchematicsPage.java
Outdated
Show resolved
Hide resolved
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/SchematicsPage.java
Outdated
Show resolved
Hide resolved
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/SchematicsPage.java
Outdated
Show resolved
Hide resolved
| && GameVersionNumber.asGameVersion(Optional.ofNullable(modManager.getGameVersion())).isAtLeast("1.16.4", "20w45a"); | ||
| if (litematica == null && !shouldUseForgematica) { | ||
| try { | ||
| litematica = ModrinthRemoteModRepository.MODS.getModById("litematica"); |
There was a problem hiding this comment.
不要在默认线程池中执行网络操作。
而且我觉得这样做可能不太必要,我觉得如果没有检测到用户安装相关模组的话直接隐藏掉这个标签页可能更合适。
There was a problem hiding this comment.
而且我觉得这样做可能不太必要,我觉得如果没有检测到用户安装相关模组的话直接隐藏掉这个标签页可能更合适。
那万一识别错了或者人家只是暂时不想装不就炸了吗,直接用不了。现在如果出错起码还能用
..返回组件,在上方工具栏中添加返回按钮可能会做:
Resolves #4052 Resolves #4518 Resolves #3957
#3597 应在本 pr 和 #5095 均合并后再关闭