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

Method revertToBase

launcher/minecraft/PackProfile.cpp:715–731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

713}
714
715bool PackProfile::revertToBase(int index)
716{
717 auto patch = getComponent(index);
718 if (!patch->isRevertible())
719 {
720 qDebug() << "Patch" << patch->getID() << "is not revertible";
721 return false;
722 }
723 if(!patch->revert())
724 {
725 qCritical() << "Patch" << patch->getID() << "could not be reverted";
726 return false;
727 }
728 invalidateLaunchProfile();
729 scheduleSave();
730 return true;
731}
732
733Component * PackProfile::getComponent(const QString &id)
734{

Callers 1

Calls 3

isRevertibleMethod · 0.80
getIDMethod · 0.80
revertMethod · 0.80

Tested by

no test coverage detected