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

Method executeTask

launcher/minecraft/MinecraftUpdate.cpp:41–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void MinecraftUpdate::executeTask()
42{
43 m_tasks.clear();
44 // create folders
45 {
46 m_tasks.append(new FoldersTask(m_inst));
47 }
48
49 // add metadata update task if necessary
50 {
51 auto components = m_inst->getPackProfile();
52 components->reload(Net::Mode::Online);
53 auto task = components->getCurrentTask();
54 if(task)
55 {
56 m_tasks.append(task);
57 }
58 }
59
60 // libraries download
61 {
62 m_tasks.append(new LibrariesTask(m_inst));
63 }
64
65 // FML libraries download and copy into the instance
66 {
67 m_tasks.append(new FMLLibrariesTask(m_inst));
68 }
69
70 // assets update
71 {
72 m_tasks.append(new AssetUpdateTask(m_inst));
73 }
74
75 if(!m_preFailure.isEmpty())
76 {
77 emitFailed(m_preFailure);
78 return;
79 }
80 next();
81}
82
83void MinecraftUpdate::next()
84{

Callers

nothing calls this directly

Calls 7

nextFunction · 0.85
appendMethod · 0.80
getPackProfileMethod · 0.80
isEmptyMethod · 0.80
clearMethod · 0.45
reloadMethod · 0.45
getCurrentTaskMethod · 0.45

Tested by

no test coverage detected