From 576d808d7197b4b7ef798891dfd138e2e8aae54f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 13 Mar 2016 02:28:55 +0100 Subject: NOISSUE resolve library activeness during application to profile --- logic/minecraft/ftb/FTBProfileStrategy.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'logic/minecraft/ftb/FTBProfileStrategy.cpp') diff --git a/logic/minecraft/ftb/FTBProfileStrategy.cpp b/logic/minecraft/ftb/FTBProfileStrategy.cpp index 6f635fe8..d43fbf6e 100644 --- a/logic/minecraft/ftb/FTBProfileStrategy.cpp +++ b/logic/minecraft/ftb/FTBProfileStrategy.cpp @@ -19,6 +19,7 @@ void FTBProfileStrategy::loadDefaultBuiltinPatches() // FIXME: this should be here, but it needs us to be able to deal with multiple libraries paths // OneSixProfileStrategy::loadDefaultBuiltinPatches(); auto mcVersion = m_instance->intendedVersionId(); + auto nativeInstance = dynamic_cast(m_instance); ProfilePatchPtr minecraftPatch; { @@ -34,6 +35,11 @@ void FTBProfileStrategy::loadDefaultBuiltinPatches() { file->version = mcVersion; } + for(auto addLib: file->libraries) + { + addLib->setHint("local"); + addLib->setStoragePrefix(nativeInstance->librariesPath().absolutePath()); + } minecraftPatch = std::dynamic_pointer_cast(file); } else @@ -44,7 +50,6 @@ void FTBProfileStrategy::loadDefaultBuiltinPatches() } profile->appendPatch(minecraftPatch); - auto nativeInstance = dynamic_cast(m_instance); ProfilePatchPtr packPatch; { auto mcJson = m_instance->minecraftRoot() + "/pack.json"; @@ -55,7 +60,7 @@ void FTBProfileStrategy::loadDefaultBuiltinPatches() // adapt the loaded file - the FTB patch file format is different than ours. file->id.clear(); - for(auto addLib: file->addLibs) + for(auto addLib: file->libraries) { addLib->setHint("local"); addLib->setStoragePrefix(nativeInstance->librariesPath().absolutePath()); -- cgit v1.2.3