Merge pull request #3562 from kb-1000/technic-fix-1710-forge
Fix up 1.7.10 forge versions for Technic platform import by removing -1.7.10 suffix
This commit is contained in:
commit
8eee4e3e6c
@ -175,9 +175,18 @@ void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings, const
|
|||||||
auto libraryName = Json::ensureString(libraryObject, "name", "", "");
|
auto libraryName = Json::ensureString(libraryObject, "name", "", "");
|
||||||
|
|
||||||
if (libraryName.startsWith("net.minecraftforge:forge:") && libraryName.contains('-'))
|
if (libraryName.startsWith("net.minecraftforge:forge:") && libraryName.contains('-'))
|
||||||
|
{
|
||||||
|
QString libraryVersion = libraryName.section(':', 2);
|
||||||
|
if (!libraryVersion.startsWith("1.7.10-"))
|
||||||
{
|
{
|
||||||
components->setComponentVersion("net.minecraftforge", libraryName.section('-', 1));
|
components->setComponentVersion("net.minecraftforge", libraryName.section('-', 1));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 1.7.10 versions sometimes look like 1.7.10-10.13.4.1614-1.7.10, this filters out the 10.13.4.1614 part
|
||||||
|
components->setComponentVersion("net.minecraftforge", libraryName.section('-', 1, 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (libraryName.startsWith("net.minecraftforge:minecraftforge:"))
|
else if (libraryName.startsWith("net.minecraftforge:minecraftforge:"))
|
||||||
{
|
{
|
||||||
components->setComponentVersion("net.minecraftforge", libraryName.section(':', 2));
|
components->setComponentVersion("net.minecraftforge", libraryName.section(':', 2));
|
||||||
|
Loading…
Reference in New Issue
Block a user