MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / getModLoaders

Method getModLoaders

launcher/minecraft/PackProfile.cpp:1021–1039  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1019}
1020
1021std::optional<ModPlatform::ModLoaderTypes> PackProfile::getModLoaders()
1022{
1023 ModPlatform::ModLoaderTypes result;
1024 bool has_any_loader = false;
1025
1026 QMapIterator<QString, ModloaderMapEntry> i(Component::KNOWN_MODLOADERS);
1027
1028 while (i.hasNext()) {
1029 i.next();
1030 if (auto c = getComponent(i.key()); c != nullptr && c->isEnabled()) {
1031 result |= i.value().type;
1032 has_any_loader = true;
1033 }
1034 }
1035
1036 if (!has_any_loader)
1037 return {};
1038 return result;
1039}
1040
1041std::optional<ModPlatform::ModLoaderTypes> PackProfile::getSupportedModLoaders()
1042{

Callers 3

downloadModsMethod · 0.80
updateModsMethod · 0.80
changeModVersionMethod · 0.80

Calls 2

isEnabledMethod · 0.80
valueMethod · 0.80

Tested by

no test coverage detected