fix: update curse fabric mod. Closes #1091.

This commit is contained in:
huanghongxun
2021-10-07 15:22:03 +08:00
parent fdbe38496a
commit 6ce5106271

View File

@@ -503,6 +503,15 @@ public class CurseAddon implements RemoteMod.IMod {
break; break;
} }
ModLoaderType modLoaderType;
if (gameVersion.contains("Forge")) {
modLoaderType = ModLoaderType.FORGE;
} else if (gameVersion.contains("Fabric")) {
modLoaderType = ModLoaderType.FABRIC;
} else {
modLoaderType = ModLoaderType.UNKNOWN;
}
return new RemoteMod.Version( return new RemoteMod.Version(
this, this,
Integer.toString(projectId), Integer.toString(projectId),
@@ -514,7 +523,7 @@ public class CurseAddon implements RemoteMod.IMod {
new RemoteMod.File(Collections.emptyMap(), getDownloadUrl(), getFileName()), new RemoteMod.File(Collections.emptyMap(), getDownloadUrl(), getFileName()),
Collections.emptyList(), Collections.emptyList(),
gameVersion.stream().filter(ver -> ver.startsWith("1.") || ver.contains("w")).collect(Collectors.toList()), gameVersion.stream().filter(ver -> ver.startsWith("1.") || ver.contains("w")).collect(Collectors.toList()),
Collections.singletonList(ModLoaderType.FORGE) Collections.singletonList(modLoaderType)
); );
} }
} }