mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-10 04:16:02 -04:00
parent
773ef4282c
commit
c12ae9fdf8
@ -160,12 +160,17 @@ public final class ForgeNewModMetadata {
|
|||||||
|
|
||||||
private static ModLoaderType analyzeLoader(Toml toml, String modID, int loaderACC, ModLoaderType defaultLoader) throws IOException {
|
private static ModLoaderType analyzeLoader(Toml toml, String modID, int loaderACC, ModLoaderType defaultLoader) throws IOException {
|
||||||
List<HashMap<String, Object>> dependencies = toml.getList("dependencies." + modID);
|
List<HashMap<String, Object>> dependencies = toml.getList("dependencies." + modID);
|
||||||
if (dependencies != null) {
|
if (dependencies == null) {
|
||||||
for (HashMap<String, Object> dependency : dependencies) {
|
dependencies = toml.getList("dependencies"); // ??? I have no idea why some of the Forge mods use [[dependencies]]
|
||||||
switch ((String) dependency.get("modId")) {
|
if (dependencies == null) {
|
||||||
case "forge": return checkLoaderACC(loaderACC, ACC_FORGE, ModLoaderType.FORGE);
|
return defaultLoader;
|
||||||
case "neoforge": return checkLoaderACC(loaderACC, ACC_NEO_FORGED, ModLoaderType.NEO_FORGED);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (HashMap<String, Object> dependency : dependencies) {
|
||||||
|
switch ((String) dependency.get("modId")) {
|
||||||
|
case "forge": return checkLoaderACC(loaderACC, ACC_FORGE, ModLoaderType.FORGE);
|
||||||
|
case "neoforge": return checkLoaderACC(loaderACC, ACC_NEO_FORGED, ModLoaderType.NEO_FORGED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user