| 12 | {} |
| 13 | |
| 14 | bool VanillaCreationTask::createInstance() |
| 15 | { |
| 16 | setStatus(tr("Creating instance from version %1").arg(m_version->name())); |
| 17 | |
| 18 | auto instance_settings = std::make_shared<INISettingsObject>(FS::PathCombine(m_stagingPath, "instance.cfg")); |
| 19 | instance_settings->suspendSave(); |
| 20 | { |
| 21 | MinecraftInstance inst(m_globalSettings, instance_settings, m_stagingPath); |
| 22 | auto components = inst.getPackProfile(); |
| 23 | components->buildingFromScratch(); |
| 24 | components->setComponentVersion("net.minecraft", m_version->descriptor(), true); |
| 25 | if(m_using_loader) |
| 26 | components->setComponentVersion(m_loader, m_loader_version->descriptor()); |
| 27 | |
| 28 | inst.setName(name()); |
| 29 | inst.setIconKey(m_instIcon); |
| 30 | } |
| 31 | instance_settings->resumeSave(); |
| 32 | |
| 33 | return true; |
| 34 | } |
nothing calls this directly
no test coverage detected