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

Method executeTask

launcher/minecraft/launch/ReconstructAssets.cpp:22–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20#include "launch/LaunchTask.h"
21
22void ReconstructAssets::executeTask()
23{
24 auto instance = m_parent->instance();
25 std::shared_ptr<MinecraftInstance> minecraftInstance = std::dynamic_pointer_cast<MinecraftInstance>(instance);
26 auto components = minecraftInstance->getPackProfile();
27 auto profile = components->getProfile();
28 auto assets = profile->getMinecraftAssets();
29
30 if(!AssetsUtils::reconstructAssets(assets->id, minecraftInstance->resourcesDir()))
31 {
32 emit logLine("Failed to reconstruct Minecraft assets.", MessageLevel::Error);
33 }
34
35 emitSucceeded();
36}

Callers

nothing calls this directly

Calls 6

reconstructAssetsFunction · 0.85
getPackProfileMethod · 0.80
getProfileMethod · 0.80
getMinecraftAssetsMethod · 0.80
resourcesDirMethod · 0.80
instanceMethod · 0.45

Tested by

no test coverage detected