mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 08:44:25 +00:00
A different approach to my changes in https://github.com/MinecraftForge/MinecraftForge/commit/8ace535995522bec0557d4217e0d98b3dc76cf1e to fix #5207
This commit is contained in:
1 parent
f9c2f715fd
commit
10dbbf9c19
3 files changed
+10
-3
No files matched your search
@@ -88,6 +88,7 @@ license {
|
||||
header = project.file('LICENSE-header.txt')
|
||||
|
||||
include 'net/minecraftforge/'
|
||||
exclude 'net/minecraftforge/api/distmarker/'
|
||||
exclude 'net/minecraftforge/fml/repackage/'
|
||||
exclude 'net/minecraftforge/server/terminalconsole/'
|
||||
exclude 'net/minecraftforge/fml/common/versioning/ComparableVersion.java'
|
||||
|
||||
@@ -122,6 +122,8 @@ public class FMLTweaker implements ITweaker {
|
||||
|
||||
Yggdrasil.login(launchArgs);
|
||||
|
||||
Launch.blackboard.put("forgeLaunchArgs", Maps.newHashMap(launchArgs));
|
||||
|
||||
try
|
||||
{
|
||||
jarLocation = getClass().getProtectionDomain().getCodeSource().getLocation().toURI();
|
||||
@@ -143,6 +145,11 @@ public class FMLTweaker implements ITweaker {
|
||||
@Override
|
||||
public String getLaunchTarget()
|
||||
{
|
||||
// Remove the extraneous mods and modListFile args
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String,String> args = (Map<String, String>) Launch.blackboard.get("launchArgs");
|
||||
args.remove("--modListFile");
|
||||
args.remove("--mods");
|
||||
return "net.minecraft.client.main.Main";
|
||||
}
|
||||
|
||||
@@ -154,11 +161,10 @@ public class FMLTweaker implements ITweaker {
|
||||
|
||||
for (Entry<String, String> arg : launchArgs.entrySet())
|
||||
{
|
||||
if ("--modListFile".equals(arg.getKey()) || "--mods".equals(arg.getKey()))
|
||||
continue;
|
||||
args.add(arg.getKey());
|
||||
args.add(arg.getValue());
|
||||
}
|
||||
launchArgs.clear();
|
||||
|
||||
return args.toArray(new String[args.size()]);
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ public class LibraryManager
|
||||
List<File> list = new ArrayList<>();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String,String> args = (Map<String, String>)Launch.blackboard.get("launchArgs");
|
||||
Map<String,String> args = (Map<String, String>)Launch.blackboard.get("forgeLaunchArgs");
|
||||
String extraMods = args.get("--mods");
|
||||
if (extraMods != null)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user