Add support to ModLoaderType.QUILT (#2302)

This commit is contained in:
Burning_TNT
2023-06-23 18:07:31 +08:00
committed by GitHub
parent 470c3d6c24
commit 88984378e8
3 changed files with 4 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ public enum ModLoaderType {
UNKNOWN,
FORGE,
FABRIC,
QUILT,
LITE_LOADER,
PACK
}

View File

@@ -562,6 +562,8 @@ public class CurseAddon implements RemoteMod.IMod {
modLoaderType = ModLoaderType.FORGE;
} else if (gameVersions.contains("Fabric")) {
modLoaderType = ModLoaderType.FABRIC;
} else if (gameVersions.contains("Quilt")) {
modLoaderType = ModLoaderType.QUILT;
} else {
modLoaderType = ModLoaderType.UNKNOWN;
}

View File

@@ -497,6 +497,7 @@ public final class ModrinthRemoteModRepository implements RemoteModRepository {
loaders.stream().flatMap(loader -> {
if ("fabric".equalsIgnoreCase(loader)) return Stream.of(ModLoaderType.FABRIC);
else if ("forge".equalsIgnoreCase(loader)) return Stream.of(ModLoaderType.FORGE);
else if ("quilt".equalsIgnoreCase(loader)) return Stream.of(ModLoaderType.QUILT);
else return Stream.empty();
}).collect(Collectors.toList())
));