MCPcopy Create free account
hub / github.com/MultiMC/Launcher / executeTask

Method executeTask

launcher/InstanceCreationTask.cpp:14–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12}
13
14void InstanceCreationTask::executeTask()
15{
16 setStatus(tr("Creating instance from version %1").arg(m_version->name()));
17 {
18 auto instanceSettings = std::make_shared<INISettingsObject>(FS::PathCombine(m_stagingPath, "instance.cfg"));
19 instanceSettings->suspendSave();
20 instanceSettings->registerSetting("InstanceType", "Legacy");
21 instanceSettings->set("InstanceType", "OneSix");
22 MinecraftInstance inst(m_globalSettings, instanceSettings, m_stagingPath);
23 auto components = inst.getPackProfile();
24 components->buildingFromScratch();
25 components->setComponentVersion("net.minecraft", m_version->descriptor(), true);
26 inst.setName(m_instName);
27 inst.setIconKey(m_instIcon);
28 instanceSettings->resumeSave();
29 }
30 emitSucceeded();
31}

Callers

nothing calls this directly

Calls 12

PathCombineFunction · 0.85
suspendSaveMethod · 0.80
getPackProfileMethod · 0.80
buildingFromScratchMethod · 0.80
setComponentVersionMethod · 0.80
setIconKeyMethod · 0.80
resumeSaveMethod · 0.80
nameMethod · 0.45
registerSettingMethod · 0.45
setMethod · 0.45
descriptorMethod · 0.45
setNameMethod · 0.45

Tested by

no test coverage detected