diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modinfo/ForgeNewModMetadata.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modinfo/ForgeNewModMetadata.java index 24b5471ca..a5c220c82 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modinfo/ForgeNewModMetadata.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modinfo/ForgeNewModMetadata.java @@ -277,7 +277,12 @@ public final class ForgeNewModMetadata { } private static ModLoaderType analyzeLoader(Toml toml, String modID, ModLoaderType loader) throws IOException { - List> dependencies = toml.getList("dependencies." + modID); + List> 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]]