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

Method remoteLoadSucceeded

launcher/minecraft/ComponentUpdateTask.cpp:645–665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

643}
644
645void ComponentUpdateTask::remoteLoadSucceeded(size_t taskIndex)
646{
647 auto &taskSlot = d->remoteLoadStatusList[taskIndex];
648 if(taskSlot.finished)
649 {
650 qWarning() << "Got multiple results from remote load task" << taskIndex;
651 return;
652 }
653 qDebug() << "Remote task" << taskIndex << "succeeded";
654 taskSlot.succeeded = false;
655 taskSlot.finished = true;
656 d->remoteTasksInProgress --;
657 // update the cached data of the component from the downloaded version file.
658 if (taskSlot.type == RemoteLoadStatus::Type::Version)
659 {
660 auto component = d->m_list->getComponent(taskSlot.PackProfileIndex);
661 component->m_loaded = true;
662 component->updateCachedData();
663 }
664 checkIfAllFinished();
665}
666
667
668void ComponentUpdateTask::remoteLoadFailed(size_t taskIndex, const QString& msg)

Callers

nothing calls this directly

Calls 2

getComponentMethod · 0.80
updateCachedDataMethod · 0.80

Tested by

no test coverage detected