Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
08ee37b
延迟加载深层目录中的原理图
Calboot Jan 30, 2026
b87a6d0
异步加载
Calboot Jan 31, 2026
3c2e3ba
update
Calboot Jan 31, 2026
27e1371
Fix rippler
Calboot Jan 31, 2026
cc43366
接入 NBTEditorPage
Calboot Jan 31, 2026
e8af74f
添加返回按钮
Calboot Feb 1, 2026
95f20c3
update
Calboot Feb 1, 2026
d7d7f01
update
Calboot Feb 1, 2026
cdcb8ac
update
Calboot Feb 1, 2026
485d6ec
fix refresh
Calboot Feb 1, 2026
aecd81d
update
Calboot Feb 1, 2026
512641a
Resolves #4052
Calboot Feb 1, 2026
145d439
update
Calboot Feb 1, 2026
959c94d
Resolves #3957 (需要进一步测试)
Calboot Feb 1, 2026
5ae71b7
Fix text
Calboot Feb 1, 2026
c9c902b
update
Calboot Feb 1, 2026
8e589e5
更新测试
Calboot Feb 1, 2026
abd6862
支持 *.schem
Calboot Feb 2, 2026
3a30647
update
Calboot Feb 2, 2026
6733a58
添加投影提示
Calboot Feb 2, 2026
c1b8336
forgematica
Calboot Feb 2, 2026
e080a05
Apply i18n suggestions
Calboot Feb 2, 2026
ad468af
副版本号
Calboot Feb 2, 2026
20ba1b8
update
Calboot Feb 2, 2026
5519f96
update
Calboot Feb 2, 2026
2515bb2
update
Calboot Feb 2, 2026
5af02ba
update
Calboot Feb 2, 2026
25cf9f4
update
Calboot Feb 2, 2026
32bf679
Apply i18n suggestions
Calboot Feb 2, 2026
6f1618b
Update HMCL/src/main/resources/assets/lang/I18N_zh.properties
Calboot Feb 2, 2026
3c8eaab
smooth scrolling
Calboot Feb 2, 2026
a8dbea2
Merge branch 'main' into litematica
Calboot Feb 2, 2026
e96e43a
tip
Calboot Feb 2, 2026
64b86b7
Apply suggestions from code review
Calboot Feb 2, 2026
0a460e7
update
Calboot Feb 3, 2026
7d2ace7
OptionalInt
Calboot Feb 3, 2026
ef2911f
License header
Calboot Feb 6, 2026
0df85d2
update
Calboot Feb 6, 2026
dcfb5d0
update
Calboot Feb 6, 2026
287b762
update
Calboot Feb 6, 2026
5cfd00a
Merge branch 'main' into litematica
Calboot Feb 6, 2026
9a1a8bd
update
Calboot Feb 6, 2026
477e372
update
Calboot Feb 6, 2026
b1adbf2
update
Calboot Feb 6, 2026
de07a28
update
Calboot Feb 6, 2026
fadde6e
update
Calboot Feb 6, 2026
a942a20
update
Calboot Feb 6, 2026
7bc5168
Merge branch 'main' into litematica
Calboot Feb 7, 2026
b2149a5
Merge branch 'HMCL-dev:main' into litematica
Calboot Feb 8, 2026
f8a96ee
update
Calboot Feb 8, 2026
212c912
rename
Calboot Feb 8, 2026
6c59daf
update
Calboot Feb 8, 2026
39d54ea
update
Calboot Feb 8, 2026
a3b9a87
Apply AI suggestions
Calboot Feb 8, 2026
8041896
Merge branch 'main' into litematica
Calboot Feb 19, 2026
b178014
update
Calboot Feb 19, 2026
b78c3f9
Merge branch 'HMCL-dev:main' into litematica
Calboot Feb 24, 2026
f8ea61b
Merge branch 'main' into litematica
Calboot Feb 25, 2026
967e23d
优化UI
Calboot Feb 25, 2026
f6c4c56
Merge branch 'main' into litematica
Calboot Feb 26, 2026
5774b50
update
Calboot Feb 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.StackPane;
import javafx.scene.text.TextFlow;
import org.jackhuang.hmcl.ui.construct.ComponentList;
import org.jackhuang.hmcl.ui.construct.SpinnerPane;

Expand Down Expand Up @@ -99,6 +100,12 @@ public static JFXButton createDecoratorButton(String tooltip, SVG svg, Runnable
return ret;
}

public static TextFlow createTip() {
TextFlow textFlow = new TextFlow();
textFlow.getStyleClass().add("list-tip");
return textFlow;
}

protected abstract List<Node> initializeToolbar(P skinnable);

protected ListCell<E> createListCell(JFXListView<E> listView) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public abstract class MDListCell<T> extends ListCell<T> {
private static final PseudoClass SELECTED = PseudoClass.getPseudoClass("selected");

private final StackPane container = new StackPane();
private final RipplerContainer ripplerContainer;
private final StackPane root = new StackPane();

public MDListCell(JFXListView<T> listView) {
Expand All @@ -37,7 +38,7 @@ public MDListCell(JFXListView<T> listView) {
setGraphic(null);

root.getStyleClass().add("md-list-cell");
RipplerContainer ripplerContainer = new RipplerContainer(container);
this.ripplerContainer = new RipplerContainer(container);
root.getChildren().setAll(ripplerContainer);

Region clippedContainer = (Region) listView.lookup(".clipped-container");
Expand Down Expand Up @@ -73,5 +74,9 @@ protected void setSelectable() {
});
}

protected void onClicked(Runnable action) {
FXUtils.onClicked(ripplerContainer, action);
}

protected abstract void updateControl(T item, boolean empty);
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* @author Glavo
*/
public enum NBTFileType {
COMPRESSED("dat", "dat_old") {
COMPRESSED("dat", "dat_old", "litematic", "nbt", "schematic", "schem") {
@Override
public Tag read(Path file) throws IOException {
try (BufferedInputStream fileInputStream = new BufferedInputStream(Files.newInputStream(file))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ public void selectVersion(String versionID) {
FXUtils.runInFX(() -> selectedVersion.set(versionID));
}

public DownloadPage.DownloadCallback getCallback() {
return callback;
}

private void search(String userGameVersion, RemoteModRepository.Category category, int pageOffset, String searchFilter, RemoteModRepository.SortType sort) {
retrySearch = null;
setLoading(true);
Expand Down
51 changes: 3 additions & 48 deletions HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public final class ModListPage extends ListPageBase<ModListPageSkin.ModInfoObjec
private ModManager modManager;
private Profile profile;
private String instanceId;
private String gameVersion;

final EnumSet<ModLoaderType> supportedLoaders = EnumSet.noneOf(ModLoaderType.class);

Expand Down Expand Up @@ -90,7 +89,7 @@ public void loadVersion(Profile profile, String id) {

HMCLGameRepository repository = profile.getRepository();
Version resolved = repository.getResolvedPreservingPatchesVersion(id);
this.gameVersion = repository.getGameVersion(resolved).orElse(null);
String gameVersion = repository.getGameVersion(resolved).orElse(null);
LibraryAnalyzer analyzer = LibraryAnalyzer.analyze(resolved, gameVersion);
modded.set(analyzer.hasModLoader());
loadMods(profile.getRepository().getModManager(id));
Expand All @@ -111,7 +110,8 @@ private void loadMods(ModManager modManager) {
lock.unlock();
}
}, Schedulers.io()).whenCompleteAsync((list, exception) -> {
updateSupportedLoaders(modManager);
supportedLoaders.clear();
supportedLoaders.addAll(modManager.getSupportedLoaders());

if (exception == null) {
getItems().setAll(list);
Expand All @@ -123,51 +123,6 @@ private void loadMods(ModManager modManager) {
}, Schedulers.javafx());
}

private void updateSupportedLoaders(ModManager modManager) {
supportedLoaders.clear();

LibraryAnalyzer analyzer = modManager.getLibraryAnalyzer();
if (analyzer == null) {
Collections.addAll(supportedLoaders, ModLoaderType.values());
return;
}

for (LibraryAnalyzer.LibraryType type : LibraryAnalyzer.LibraryType.values()) {
if (type.isModLoader() && analyzer.has(type)) {
ModLoaderType modLoaderType = type.getModLoaderType();
if (modLoaderType != null) {
supportedLoaders.add(modLoaderType);

if (modLoaderType == ModLoaderType.CLEANROOM)
supportedLoaders.add(ModLoaderType.FORGE);
}
}
}

if (analyzer.has(LibraryAnalyzer.LibraryType.NEO_FORGE) && "1.20.1".equals(gameVersion)) {
supportedLoaders.add(ModLoaderType.FORGE);
}

if (analyzer.has(LibraryAnalyzer.LibraryType.QUILT)) {
supportedLoaders.add(ModLoaderType.FABRIC);
}

if (analyzer.has(LibraryAnalyzer.LibraryType.LEGACY_FABRIC)) {
supportedLoaders.add(ModLoaderType.FABRIC);
}

if (analyzer.has(LibraryAnalyzer.LibraryType.FABRIC) && modManager.hasMod("kilt", ModLoaderType.FABRIC)) {
supportedLoaders.add(ModLoaderType.FORGE);
supportedLoaders.add(ModLoaderType.NEO_FORGED);
}

// Sinytra Connector
if (analyzer.has(LibraryAnalyzer.LibraryType.NEO_FORGE) && modManager.hasMod("connectormod", ModLoaderType.NEO_FORGED)
|| "1.20.1".equals(gameVersion) && analyzer.has(LibraryAnalyzer.LibraryType.FORGE) && modManager.hasMod("connectormod", ModLoaderType.FORGE)) {
supportedLoaders.add(ModLoaderType.FABRIC);
}
}

public void add() {
FileChooser chooser = new FileChooser();
chooser.setTitle(i18n("mods.add.title"));
Expand Down
Loading