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

Function loadIndex

launcher/minecraft/ComponentUpdateTask.cpp:155–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153*/
154
155static LoadResult loadIndex(Task::Ptr& loadTask, Net::Mode netmode)
156{
157 // FIXME: DECIDE. do we want to run the update task anyway?
158 if(APPLICATION->metadataIndex()->isLoaded())
159 {
160 qDebug() << "Index is already loaded";
161 return LoadResult::LoadedLocal;
162 }
163 APPLICATION->metadataIndex()->load(netmode);
164 loadTask = APPLICATION->metadataIndex()->getCurrentTask();
165 if(loadTask)
166 {
167 return LoadResult::RequiresRemote;
168 }
169 // FIXME: this is assuming the load succeeded... did it really?
170 return LoadResult::LoadedLocal;
171}
172}
173
174void ComponentUpdateTask::loadComponents()

Callers 1

loadComponentsMethod · 0.85

Calls 4

metadataIndexMethod · 0.80
isLoadedMethod · 0.45
loadMethod · 0.45
getCurrentTaskMethod · 0.45

Tested by

no test coverage detected