MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / applyTo

Method applyTo

launcher/minecraft/VersionFile.cpp:54–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void VersionFile::applyTo(LaunchProfile *profile, const RuntimeContext & runtimeContext)
55{
56 // Only real Minecraft can set those. Don't let anything override them.
57 if (isMinecraftVersion(uid))
58 {
59 profile->applyMinecraftVersion(version);
60 profile->applyMinecraftVersionType(type);
61 // HACK: ignore assets from other version files than Minecraft
62 // workaround for stupid assets issue caused by amazon:
63 // https://www.theregister.co.uk/2017/02/28/aws_is_awol_as_s3_goes_haywire/
64 profile->applyMinecraftAssets(mojangAssetIndex);
65 }
66
67 profile->applyMainJar(mainJar);
68 profile->applyMainClass(mainClass);
69 profile->applyAppletClass(appletClass);
70 profile->applyMinecraftArguments(minecraftArguments);
71 profile->applyAddnJvmArguments(addnJvmArguments);
72 profile->applyTweakers(addTweakers);
73 profile->applyJarMods(jarMods);
74 profile->applyMods(mods);
75 profile->applyTraits(traits);
76 profile->applyCompatibleJavaMajors(compatibleJavaMajors);
77
78 for (auto library : libraries)
79 {
80 profile->applyLibrary(library, runtimeContext);
81 }
82 for (auto mavenFile : mavenFiles)
83 {
84 profile->applyMavenFile(mavenFile, runtimeContext);
85 }
86 for (auto agent : agents)
87 {
88 profile->applyAgent(agent, runtimeContext);
89 }
90 profile->applyProblemSeverity(getProblemSeverity());
91}

Callers

nothing calls this directly

Calls 15

isMinecraftVersionFunction · 0.85
applyMinecraftVersionMethod · 0.80
applyMinecraftAssetsMethod · 0.80
applyMainJarMethod · 0.80
applyMainClassMethod · 0.80
applyAppletClassMethod · 0.80
applyAddnJvmArgumentsMethod · 0.80
applyTweakersMethod · 0.80
applyJarModsMethod · 0.80
applyModsMethod · 0.80

Tested by

no test coverage detected