MCPcopy Create free account
hub / github.com/MultiMC/Launcher / ReadForgeInfo

Function ReadForgeInfo

launcher/minecraft/mod/LocalModParseTask.cpp:310–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308}
309
310std::shared_ptr<ModDetails> ReadForgeInfo(QByteArray contents)
311{
312 std::shared_ptr<ModDetails> details = std::make_shared<ModDetails>();
313 // Read the data
314 details->name = "Minecraft Forge";
315 details->mod_id = "Forge";
316 details->homeurl = "http://www.minecraftforge.net/forum/";
317 INIFile ini;
318 if (!ini.loadFile(contents))
319 return details;
320
321 QString major = ini.get("forge.major.number", "0").toString();
322 QString minor = ini.get("forge.minor.number", "0").toString();
323 QString revision = ini.get("forge.revision.number", "0").toString();
324 QString build = ini.get("forge.build.number", "0").toString();
325
326 details->version = major + "." + minor + "." + revision + "." + build;
327 return details;
328}
329
330std::shared_ptr<ModDetails> ReadLiteModInfo(QByteArray contents)
331{

Callers 1

processAsZipMethod · 0.85

Calls 3

loadFileMethod · 0.80
toStringMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected