Permalink
Browse files

Fix --mods and --modListFile arguments not making it past LaunchWrapper.

  • Loading branch information...
LexManos committed Sep 4, 2018
1 parent f2da4be commit 8ace535995522bec0557d4217e0d98b3dc76cf1e
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/main/java/net/minecraftforge/fml/common/launcher/FMLTweaker.java
@@ -143,11 +143,6 @@ public void injectIntoClassLoader(LaunchClassLoader classLoader)
@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";
}

@@ -159,10 +154,11 @@ public String getLaunchTarget()

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()]);
}

0 comments on commit 8ace535

Please sign in to comment.