Merge pull request #743 from flowln/fix_mods_with_wrong_modListVersion
This commit is contained in:
commit
cf022524d1
@ -17,7 +17,7 @@
|
|||||||
namespace ModUtils {
|
namespace ModUtils {
|
||||||
|
|
||||||
// NEW format
|
// NEW format
|
||||||
// https://github.com/MinecraftForge/FML/wiki/FML-mod-information-file/6f62b37cea040daf350dc253eae6326dd9c822c3
|
// https://github.com/MinecraftForge/FML/wiki/FML-mod-information-file/c8d8f1929aff9979e322af79a59ce81f3e02db6a
|
||||||
|
|
||||||
// OLD format:
|
// OLD format:
|
||||||
// https://github.com/MinecraftForge/FML/wiki/FML-mod-information-file/5bf6a2d05145ec79387acc0d45c958642fb049fc
|
// https://github.com/MinecraftForge/FML/wiki/FML-mod-information-file/5bf6a2d05145ec79387acc0d45c958642fb049fc
|
||||||
@ -74,10 +74,11 @@ ModDetails ReadMCModInfo(QByteArray contents)
|
|||||||
version = Json::ensureString(val, "").toInt();
|
version = Json::ensureString(val, "").toInt();
|
||||||
|
|
||||||
if (version != 2) {
|
if (version != 2) {
|
||||||
qCritical() << "BAD stuff happened to mod json:";
|
qWarning() << QString(R"(The value of 'modListVersion' is "%1" (expected "2")! The file may be corrupted.)").arg(version);
|
||||||
qCritical() << contents;
|
qWarning() << "The contents of 'mcmod.info' are as follows:";
|
||||||
return {};
|
qWarning() << contents;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto arrVal = jsonDoc.object().value("modlist");
|
auto arrVal = jsonDoc.object().value("modlist");
|
||||||
if (arrVal.isUndefined()) {
|
if (arrVal.isUndefined()) {
|
||||||
arrVal = jsonDoc.object().value("modList");
|
arrVal = jsonDoc.object().value("modList");
|
||||||
|
Loading…
Reference in New Issue
Block a user