[Enhancement] 原理图管理优化 #6094
Conversation
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request refactors and extends the launcher's schematics management by introducing a unified Schematic base class and adding support for new formats, including legacy/Sponge .schematic/.schem files and vanilla .nbt structure files. It also updates the UI to support directory navigation, asynchronous loading, and direct Litematica mod installation. The review feedback identifies several critical issues, including unsafe background thread access to JavaFX properties, potential UI thread blocking from synchronous disk deletion and lock contention, a double-checked locking concurrency bug due to non-volatile fields, and potential parsing failures for large schematics when using tryGetShort instead of tryGetInt.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
# Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java # HMCLCore/src/main/java/org/jackhuang/hmcl/game/DefaultGameRepository.java
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors and extends schematic file support in HMCL, introducing a unified Schematic base class with concrete implementations for Litematic, Schem, and NBT Structure formats. It also updates the UI to support these formats, adds custom schematic directory resolution from Litematica's configuration, and refactors mod loader analysis in ModManager. The review feedback highlights a potential NullPointerException in ModManager when analyzer is null, potential overflow issues when parsing large schematic dimensions in SchemFile, and a minor optimization opportunity to avoid a redundant call in SchematicsPage.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
# Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPage.java # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/SchematicsPage.java
# Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPage.java
Glavo
left a comment
There was a problem hiding this comment.
本审查建议由 GPT-5.6 Sol 生成
已将具体审查建议标注在对应代码行。
|
试了一下 发现有关 #4518 的问题: 为什么不在没安装 |
# Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/ui/nbt/NBTFileType.java # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPage.java # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/SchematicsPage.java
Resolves #4052 Resolves #4518 Resolves #3957
#3597 应在本 PR 合并后并实现 NBT 修改功能后关闭