GH-1016 print mods, jar mods and core mods on start
Needs some work - jar mods just have the uuid name
This commit is contained in:
parent
99f248ecd4
commit
9920062003
@ -33,6 +33,8 @@ public class OneSixLauncher implements Launcher
|
|||||||
private List<String> extlibs;
|
private List<String> extlibs;
|
||||||
private List<String> mcparams;
|
private List<String> mcparams;
|
||||||
private List<String> mods;
|
private List<String> mods;
|
||||||
|
private List<String> jarmods;
|
||||||
|
private List<String> coremods;
|
||||||
private List<String> traits;
|
private List<String> traits;
|
||||||
private String appletClass;
|
private String appletClass;
|
||||||
private String mainClass;
|
private String mainClass;
|
||||||
@ -56,7 +58,9 @@ public class OneSixLauncher implements Launcher
|
|||||||
mcparams = params.allSafe("param", new ArrayList<String>() );
|
mcparams = params.allSafe("param", new ArrayList<String>() );
|
||||||
mainClass = params.firstSafe("mainClass", "net.minecraft.client.Minecraft");
|
mainClass = params.firstSafe("mainClass", "net.minecraft.client.Minecraft");
|
||||||
appletClass = params.firstSafe("appletClass", "net.minecraft.client.MinecraftApplet");
|
appletClass = params.firstSafe("appletClass", "net.minecraft.client.MinecraftApplet");
|
||||||
mods = params.allSafe("mods", new ArrayList<String>());
|
mods = params.allSafe("mod", new ArrayList<String>());
|
||||||
|
jarmods = params.allSafe("jarmod", new ArrayList<String>());
|
||||||
|
coremods = params.allSafe("coremod", new ArrayList<String>());
|
||||||
traits = params.allSafe("traits", new ArrayList<String>());
|
traits = params.allSafe("traits", new ArrayList<String>());
|
||||||
natives = params.first("natives");
|
natives = params.first("natives");
|
||||||
|
|
||||||
@ -115,7 +119,7 @@ public class OneSixLauncher implements Launcher
|
|||||||
|
|
||||||
if(mods.size() > 0)
|
if(mods.size() > 0)
|
||||||
{
|
{
|
||||||
Utils.log("Class Path Mods:");
|
Utils.log("Mods:");
|
||||||
for (String s : mods)
|
for (String s : mods)
|
||||||
{
|
{
|
||||||
Utils.log(" " + s);
|
Utils.log(" " + s);
|
||||||
@ -123,6 +127,26 @@ public class OneSixLauncher implements Launcher
|
|||||||
Utils.log();
|
Utils.log();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(coremods.size() > 0)
|
||||||
|
{
|
||||||
|
Utils.log("Core Mods:");
|
||||||
|
for (String s : coremods)
|
||||||
|
{
|
||||||
|
Utils.log(" " + s);
|
||||||
|
}
|
||||||
|
Utils.log();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(jarmods.size() > 0)
|
||||||
|
{
|
||||||
|
Utils.log("Jar Mods:");
|
||||||
|
for (String s : jarmods)
|
||||||
|
{
|
||||||
|
Utils.log(" " + s);
|
||||||
|
}
|
||||||
|
Utils.log();
|
||||||
|
}
|
||||||
|
|
||||||
Utils.log("Params:");
|
Utils.log("Params:");
|
||||||
Utils.log(" " + mcparams.toString());
|
Utils.log(" " + mcparams.toString());
|
||||||
Utils.log();
|
Utils.log();
|
||||||
@ -307,17 +331,11 @@ public class OneSixLauncher implements Launcher
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// do some horrible black magic with the classpath
|
// add libraries to classpath
|
||||||
|
if(!Utils.addToClassPath(libraries))
|
||||||
{
|
{
|
||||||
List<String> allJars = new ArrayList<String>();
|
System.err.println("Halting launch due to previous errors.");
|
||||||
allJars.addAll(mods);
|
return -1;
|
||||||
allJars.addAll(libraries);
|
|
||||||
|
|
||||||
if(!Utils.addToClassPath(allJars))
|
|
||||||
{
|
|
||||||
System.err.println("Halting launch due to previous errors.");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// print the pretty things
|
// print the pretty things
|
||||||
|
@ -134,6 +134,21 @@ BaseProcess *OneSixInstance::prepareForLaunch(AuthSessionPtr session)
|
|||||||
if (!m_version)
|
if (!m_version)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
for(auto & mod: loaderModList()->allMods())
|
||||||
|
{
|
||||||
|
launchScript += "mod " + mod.filename().absoluteFilePath() + "\n";;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(auto & coremod: coreModList()->allMods())
|
||||||
|
{
|
||||||
|
launchScript += "coremod " + coremod.filename().absoluteFilePath() + "\n";;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(auto & jarmod: m_version->jarMods)
|
||||||
|
{
|
||||||
|
launchScript += "jarmod " + jarmod->name + "\n";;
|
||||||
|
}
|
||||||
|
|
||||||
// libraries and class path.
|
// libraries and class path.
|
||||||
{
|
{
|
||||||
auto libs = m_version->getActiveNormalLibs();
|
auto libs = m_version->getActiveNormalLibs();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user