mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-12 02:37:34 +00:00
fix: Deploader crash when fetching mcmod.info details
Closes: https://github.com/FalsePattern/FalsePatternLib/issues/46
This commit is contained in:
2 files changed
+17
-15
No files matched your search
+1
-1
@@ -5,7 +5,7 @@ plugins {
|
||||
group = "com.falsepattern"
|
||||
|
||||
//bump this after ANY change to the deploader!
|
||||
val deploaderVersion = 4
|
||||
val deploaderVersion = 5
|
||||
|
||||
minecraft_fp {
|
||||
java {
|
||||
|
||||
@@ -298,22 +298,24 @@ public class DependencyLoaderImpl {
|
||||
|
||||
@SneakyThrows
|
||||
private static void readMCMod(InputStream input, String name) {
|
||||
val meta = MetadataCollection.from(input, name);
|
||||
val modList = (ModMetadata[])metadataCollectionModListAccessor.get(meta);
|
||||
for (val mod: modList) {
|
||||
val id = mod.modId;
|
||||
if (id != null) {
|
||||
val versionStr = mod.version;
|
||||
final Version version;
|
||||
if (versionStr != null) {
|
||||
version = Version.parse(versionStr);
|
||||
} else {
|
||||
version = new RawVersion("unknown");
|
||||
try {
|
||||
val meta = MetadataCollection.from(input, name);
|
||||
val modList = (ModMetadata[]) metadataCollectionModListAccessor.get(meta);
|
||||
for (val mod : modList) {
|
||||
val id = mod.modId;
|
||||
if (id != null) {
|
||||
val versionStr = mod.version;
|
||||
final Version version;
|
||||
if (versionStr != null) {
|
||||
version = Version.parse(versionStr);
|
||||
} else {
|
||||
version = new RawVersion("unknown");
|
||||
}
|
||||
loadedModIds.put(id, version);
|
||||
loadedModIdMods.put(id, name);
|
||||
}
|
||||
loadedModIds.put(id, version);
|
||||
loadedModIdMods.put(id, name);
|
||||
}
|
||||
}
|
||||
} catch (Throwable ignored) {}
|
||||
}
|
||||
|
||||
private static boolean scanForDepSpecs(URL source, List<URL> output, List<URL> jijURLs) {
|
||||
|
||||
Reference in new issue
Block a user