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

Method revertToBase

launcher/minecraft/PackProfile.cpp:504–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502}
503
504bool PackProfile::revertToBase(int index)
505{
506 auto patch = getComponent(index);
507 if (!patch->isRevertible())
508 {
509 qDebug() << "Patch" << patch->getID() << "is not revertible";
510 return false;
511 }
512 if(!patch->revert())
513 {
514 qCritical() << "Patch" << patch->getID() << "could not be reverted";
515 return false;
516 }
517 invalidateLaunchProfile();
518 scheduleSave();
519 return true;
520}
521
522Component * PackProfile::getComponent(const QString &id)
523{

Callers 1

Calls 3

isRevertibleMethod · 0.80
getIDMethod · 0.80
revertMethod · 0.80

Tested by

no test coverage detected