Fix #5068: 修复无法读取 AppliedE 模组信息的问题 (#5081)

This commit is contained in:
Glavo
2026-01-01 21:32:14 +08:00
committed by GitHub
parent 0c657ef382
commit fe0515ed28

View File

@@ -277,7 +277,12 @@ public final class ForgeNewModMetadata {
}
private static ModLoaderType analyzeLoader(Toml toml, String modID, ModLoaderType loader) throws IOException {
List<HashMap<String, Object>> dependencies = toml.getList("dependencies." + modID);
List<HashMap<String, Object>> dependencies = null;
try {
dependencies = toml.getList("dependencies." + modID);
} catch (ClassCastException ignored) { // https://github.com/HMCL-dev/HMCL/issues/5068
}
if (dependencies == null) {
try {
dependencies = toml.getList("dependencies"); // ??? I have no idea why some of the Forge mods use [[dependencies]]