MCPcopy Create free account
hub / github.com/PrismLauncher/PrismLauncher / CoreModFolderPage

Method CoreModFolderPage

launcher/ui/pages/instance/ModFolderPage.cpp:364–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362}
363
364CoreModFolderPage::CoreModFolderPage(BaseInstance* inst, ModFolderModel* mods, QWidget* parent) : ModFolderPage(inst, mods, parent)
365{
366 auto mcInst = dynamic_cast<MinecraftInstance*>(m_instance);
367 if (mcInst) {
368 auto version = mcInst->getPackProfile();
369 if (version && version->getComponent("net.minecraftforge") && version->getComponent("net.minecraft")) {
370 auto minecraftCmp = version->getComponent("net.minecraft");
371 if (!minecraftCmp->m_loaded) {
372 version->reload(Net::Mode::Offline);
373 auto update = version->getCurrentTask();
374 if (update) {
375 connect(update.get(), &Task::finished, this, [this] {
376 if (m_container) {
377 m_container->refreshContainer();
378 }
379 });
380 if (!update->isRunning()) {
381 update->start();
382 }
383 }
384 }
385 }
386 }
387}
388
389bool CoreModFolderPage::shouldDisplay() const
390{

Callers

nothing calls this directly

Calls 8

getPackProfileMethod · 0.80
getComponentMethod · 0.80
reloadMethod · 0.45
getCurrentTaskMethod · 0.45
getMethod · 0.45
refreshContainerMethod · 0.45
isRunningMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected