diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 17:36:40 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 17:36:40 +0300 |
| commit | 1d4bf6e8b1208383021e22f61d859e9b721c482d (patch) | |
| tree | 21c8e0c4350d7c44d817243ebf409be625ea4f21 /launcher/minecraft/VersionFile.cpp | |
| parent | 38c57e163abad6216f7e0f44d401c362c5fd5da6 (diff) | |
| download | Project-Tick-1d4bf6e8b1208383021e22f61d859e9b721c482d.tar.gz Project-Tick-1d4bf6e8b1208383021e22f61d859e9b721c482d.zip | |
NOISSUE reformat MeshMC to new clang format rules and fixed macOS portability issue and java find issue
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
Diffstat (limited to 'launcher/minecraft/VersionFile.cpp')
| -rw-r--r-- | launcher/minecraft/VersionFile.cpp | 75 |
1 files changed, 37 insertions, 38 deletions
diff --git a/launcher/minecraft/VersionFile.cpp b/launcher/minecraft/VersionFile.cpp index e37551c7d0..59fb779b28 100644 --- a/launcher/minecraft/VersionFile.cpp +++ b/launcher/minecraft/VersionFile.cpp @@ -31,51 +31,50 @@ #include <Version.h> -static bool isMinecraftVersion(const QString &uid) +static bool isMinecraftVersion(const QString& uid) { - return uid == "net.minecraft"; + return uid == "net.minecraft"; } -void VersionFile::applyTo(LaunchProfile *profile) +void VersionFile::applyTo(LaunchProfile* profile) { - // Only real Minecraft can set those. Don't let anything override them. - if (isMinecraftVersion(uid)) - { - profile->applyMinecraftVersion(minecraftVersion); - profile->applyMinecraftVersionType(type); - // HACK: ignore assets from other version files than Minecraft - // workaround for stupid assets issue caused by amazon: - // https://www.theregister.co.uk/2017/02/28/aws_is_awol_as_s3_goes_haywire/ - profile->applyMinecraftAssets(mojangAssetIndex); - } + // Only real Minecraft can set those. Don't let anything override them. + if (isMinecraftVersion(uid)) { + profile->applyMinecraftVersion(minecraftVersion); + profile->applyMinecraftVersionType(type); + // HACK: ignore assets from other version files than Minecraft + // workaround for stupid assets issue caused by amazon: + // https://www.theregister.co.uk/2017/02/28/aws_is_awol_as_s3_goes_haywire/ + profile->applyMinecraftAssets(mojangAssetIndex); + } - profile->applyMainJar(mainJar); - profile->applyMainClass(mainClass); - profile->applyAppletClass(appletClass); - profile->applyMinecraftArguments(minecraftArguments); - profile->applyTweakers(addTweakers); - profile->applyJarMods(jarMods); - profile->applyMods(mods); - profile->applyTraits(traits); + profile->applyMainJar(mainJar); + profile->applyMainClass(mainClass); + profile->applyAppletClass(appletClass); + profile->applyMinecraftArguments(minecraftArguments); + profile->applyTweakers(addTweakers); + profile->applyJarMods(jarMods); + profile->applyMods(mods); + profile->applyTraits(traits); - for (auto library : libraries) - { - profile->applyLibrary(library); - } - for (auto mavenFile : mavenFiles) - { - profile->applyMavenFile(mavenFile); - } - profile->applyProblemSeverity(getProblemSeverity()); + for (auto library : libraries) { + profile->applyLibrary(library); + } + for (auto mavenFile : mavenFiles) { + profile->applyMavenFile(mavenFile); + } + profile->applyProblemSeverity(getProblemSeverity()); } /* - auto theirVersion = profile->getMinecraftVersion(); - if (!theirVersion.isNull() && !dependsOnMinecraftVersion.isNull()) - { - if (QRegExp(dependsOnMinecraftVersion, Qt::CaseInsensitive, QRegExp::Wildcard).indexIn(theirVersion) == -1) - { - throw MinecraftVersionMismatch(uid, dependsOnMinecraftVersion, theirVersion); - } - } + auto theirVersion = profile->getMinecraftVersion(); + if (!theirVersion.isNull() && !dependsOnMinecraftVersion.isNull()) + { + if (QRegExp(dependsOnMinecraftVersion, Qt::CaseInsensitive, + QRegExp::Wildcard).indexIn(theirVersion) == -1) + { + throw MinecraftVersionMismatch(uid, dependsOnMinecraftVersion, + theirVersion); + } + } */ |
