| 20 | #include "launch/LaunchTask.h" |
| 21 | |
| 22 | void 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 | } |
nothing calls this directly
no test coverage detected