mirror of
https://github.com/LegacyModdingMC/UniMixins.git
synced 2026-11-19 20:09:38 +00:00
Fix modid decorator not parsing v2 mcmod.infos properly
This was causing mods like BugTorch 1.2.5 and ModernSplash 2c17c9a to appear as (unknown) in error messages.
This commit is contained in:
1 parent
e3633cede4
commit
ca18dc40cb
1 file changed
+6
-2
+6
-2
@@ -80,7 +80,7 @@ public final class MixinModidDecorator {
|
||||
if (root.isJsonArray()) {
|
||||
return Arrays.asList(new Gson().fromJson(new InputStreamReader(url.openStream()), ModMetadata[].class));
|
||||
} else {
|
||||
return Arrays.asList(new Gson().fromJson(new InputStreamReader(url.openStream()), ModMetadata.class));
|
||||
return ((ModMetadataCollection)new Gson().fromJson(new InputStreamReader(url.openStream()), ModMetadataCollection.class)).modList;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.warn("Failed to parse mcmod.info at " + url + ": " + e);
|
||||
@@ -103,4 +103,8 @@ public final class MixinModidDecorator {
|
||||
String modid;
|
||||
}
|
||||
|
||||
}
|
||||
private static class ModMetadataCollection {
|
||||
List<ModMetadata> modList;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user