fix: serialize metadata extensions
Prism has introduced a few extensions to the meta component version format, which were not exported as JSON in the launcher. This caused the `Customize` button on the version page to not write these new properties to the custom component file. Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
8aae652be1
commit
40970a1a87
2 changed files with 23 additions and 0 deletions
|
@ -306,6 +306,15 @@ void MojangVersionFormat::writeVersionProperties(const VersionFile* in, QJsonObj
|
|||
}
|
||||
out.insert("downloads", downloadsOut);
|
||||
}
|
||||
if(in->compatibleJavaMajors.size())
|
||||
{
|
||||
QJsonArray compatibleJavaMajorsOut;
|
||||
for(auto compatibleJavaMajor : in->compatibleJavaMajors)
|
||||
{
|
||||
compatibleJavaMajorsOut.append(compatibleJavaMajor);
|
||||
}
|
||||
out.insert("compatibleJavaMajors", compatibleJavaMajorsOut);
|
||||
}
|
||||
}
|
||||
|
||||
QJsonDocument MojangVersionFormat::versionFileToJson(const VersionFilePtr &patch)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue