summaryrefslogtreecommitdiffstats
path: root/logic/minecraft/MinecraftProfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/minecraft/MinecraftProfile.cpp')
-rw-r--r--logic/minecraft/MinecraftProfile.cpp65
1 files changed, 15 insertions, 50 deletions
diff --git a/logic/minecraft/MinecraftProfile.cpp b/logic/minecraft/MinecraftProfile.cpp
index 7586c156..1429e7b2 100644
--- a/logic/minecraft/MinecraftProfile.cpp
+++ b/logic/minecraft/MinecraftProfile.cpp
@@ -228,40 +228,6 @@ bool MinecraftProfile::revertToVanilla()
return true;
}
-QList<std::shared_ptr<Library> > MinecraftProfile::getActiveNormalLibs() const
-{
- QList<std::shared_ptr<Library> > output;
- for (auto lib : libraries)
- {
- if (lib->isActive() && !lib->isNative())
- {
- for (auto other : output)
- {
- if (other->rawName() == lib->rawName())
- {
- qWarning() << "Multiple libraries with name" << lib->rawName() << "in library list!";
- continue;
- }
- }
- output.append(lib);
- }
- }
- return output;
-}
-
-QList<std::shared_ptr<Library> > MinecraftProfile::getActiveNativeLibs() const
-{
- QList<std::shared_ptr<Library> > output;
- for (auto lib : libraries)
- {
- if (lib->isActive() && lib->isNative())
- {
- output.append(lib);
- }
- }
- return output;
-}
-
QVariant MinecraftProfile::data(const QModelIndex &index, int role) const
{
if (!index.isValid())
@@ -456,13 +422,9 @@ void MinecraftProfile::applyMainClass(const QString& mainClass)
applyString(mainClass, this->mainClass);
}
-void MinecraftProfile::applyMinecraftArguments(const QString& minecraftArguments, bool isMinecraft)
+void MinecraftProfile::applyMinecraftArguments(const QString& minecraftArguments)
{
applyString(minecraftArguments, this->minecraftArguments);
- if(isMinecraft)
- {
- applyString(minecraftArguments, this->vanillaMinecraftArguments);
- }
}
void MinecraftProfile::applyMinecraftVersionType(const QString& type)
@@ -511,7 +473,7 @@ static int findLibraryByName(QList<LibraryPtr> haystack, const GradleSpecifier &
return retval;
}
-void MinecraftProfile::applyLibrary(LibraryPtr library, bool isMinecraft)
+void MinecraftProfile::applyLibrary(LibraryPtr library)
{
auto insert = [&](QList<LibraryPtr> & into)
{
@@ -531,10 +493,17 @@ void MinecraftProfile::applyLibrary(LibraryPtr library, bool isMinecraft)
into.replace(index, libraryCopy);
}
};
- insert(libraries);
- if(isMinecraft)
+ if(!library->isActive())
+ {
+ return;
+ }
+ if(library->isNative())
{
- insert(vanillaLibraries);
+ insert(nativeLibraries);
+ }
+ else
+ {
+ insert(libraries);
}
}
@@ -596,11 +565,6 @@ QString MinecraftProfile::getMinecraftArguments() const
return minecraftArguments;
}
-QString MinecraftProfile::getVanillaMinecraftArguments() const
-{
- return vanillaMinecraftArguments;
-}
-
const QList<JarmodPtr> & MinecraftProfile::getJarMods() const
{
return jarMods;
@@ -611,11 +575,12 @@ const QList<LibraryPtr> & MinecraftProfile::getLibraries() const
return libraries;
}
-const QList<LibraryPtr> & MinecraftProfile::getVanillaLibraries() const
+const QList<LibraryPtr> & MinecraftProfile::getNativeLibraries() const
{
- return vanillaLibraries;
+ return nativeLibraries;
}
+
void MinecraftProfile::installJarMods(QStringList selectedFiles)
{
m_strategy->installJarMods(selectedFiles);