From 40970a1a87a48f434dae8583f2c71942931c3fe1 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Wed, 16 Nov 2022 18:11:17 +0100 Subject: 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 --- launcher/minecraft/OneSixVersionFormat.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'launcher/minecraft/OneSixVersionFormat.cpp') diff --git a/launcher/minecraft/OneSixVersionFormat.cpp b/launcher/minecraft/OneSixVersionFormat.cpp index c70e5ec5..ac29791b 100644 --- a/launcher/minecraft/OneSixVersionFormat.cpp +++ b/launcher/minecraft/OneSixVersionFormat.cpp @@ -331,6 +331,20 @@ QJsonDocument OneSixVersionFormat::versionFileToJson(const VersionFilePtr &patch writeString(root, "appletClass", patch->appletClass); writeStringList(root, "+tweakers", patch->addTweakers); writeStringList(root, "+traits", patch->traits.values()); + writeStringList(root, "+jvmArgs", patch->addnJvmArguments); + if (!patch->agents.isEmpty()) + { + QJsonArray array; + for (auto value: patch->agents) + { + QJsonObject agentOut = OneSixVersionFormat::libraryToJson(value->library().get()); + if (!value->argument().isEmpty()) + agentOut.insert("argument", value->argument()); + + array.append(agentOut); + } + root.insert("+agents", array); + } if (!patch->libraries.isEmpty()) { QJsonArray array; -- cgit