diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-05 19:04:53 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-05 19:04:53 +0300 |
commit | 91eb30f03795921b48360b79bdb739dcd0f10f17 (patch) | |
tree | 1a2fccbbbf4751cf2cf6f6418cb525dcee5f2acd /launcher/minecraft/VersionFile.cpp | |
parent | a3ffa6455021b69bd1940b65fefb3b6177c96730 (diff) | |
parent | ae793f6cf11658c9abc5111e82d5ba7b3e6af127 (diff) | |
download | PrismLauncher-91eb30f03795921b48360b79bdb739dcd0f10f17.tar.gz PrismLauncher-91eb30f03795921b48360b79bdb739dcd0f10f17.tar.bz2 PrismLauncher-91eb30f03795921b48360b79bdb739dcd0f10f17.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into pack_changelog
Diffstat (limited to 'launcher/minecraft/VersionFile.cpp')
-rw-r--r-- | launcher/minecraft/VersionFile.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/launcher/minecraft/VersionFile.cpp b/launcher/minecraft/VersionFile.cpp index 76f41600..6632bb8b 100644 --- a/launcher/minecraft/VersionFile.cpp +++ b/launcher/minecraft/VersionFile.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only /* - * PolyMC - Minecraft Launcher + * Prism Launcher - Minecraft Launcher * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net> * Copyright (C) 2022 Jamie Mansfield <jmansfield@cadixdev.org> * @@ -39,23 +39,22 @@ #include <QDebug> -#include "minecraft/VersionFile.h" +#include "ParseUtils.h" #include "minecraft/Library.h" #include "minecraft/PackProfile.h" -#include "ParseUtils.h" +#include "minecraft/VersionFile.h" #include <Version.h> -static bool isMinecraftVersion(const QString &uid) +static bool isMinecraftVersion(const QString& uid) { return uid == "net.minecraft"; } -void VersionFile::applyTo(LaunchProfile *profile, const RuntimeContext & runtimeContext) +void VersionFile::applyTo(LaunchProfile* profile, const RuntimeContext& runtimeContext) { // Only real Minecraft can set those. Don't let anything override them. - if (isMinecraftVersion(uid)) - { + if (isMinecraftVersion(uid)) { profile->applyMinecraftVersion(version); profile->applyMinecraftVersionType(type); // HACK: ignore assets from other version files than Minecraft @@ -75,16 +74,13 @@ void VersionFile::applyTo(LaunchProfile *profile, const RuntimeContext & runtime profile->applyTraits(traits); profile->applyCompatibleJavaMajors(compatibleJavaMajors); - for (auto library : libraries) - { + for (auto library : libraries) { profile->applyLibrary(library, runtimeContext); } - for (auto mavenFile : mavenFiles) - { + for (auto mavenFile : mavenFiles) { profile->applyMavenFile(mavenFile, runtimeContext); } - for (auto agent : agents) - { + for (auto agent : agents) { profile->applyAgent(agent, runtimeContext); } profile->applyProblemSeverity(getProblemSeverity()); |