mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 01:04:24 +00:00
Change the mods and modListFile argument handling a bit. Other tweakers will get a chance at looking
at them now - they're only removed right before launch.
This commit is contained in:
1 parent
981ffe362d
commit
c604a5e048
2 files changed
+7
-4
No files matched your search
@@ -130,6 +130,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";
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ public class ModListHelper {
|
||||
if (listFile != null)
|
||||
{
|
||||
parseListFile(listFile);
|
||||
args.remove("--modListFile");
|
||||
}
|
||||
String extraMods = args.get("--mods");
|
||||
if (extraMods != null)
|
||||
@@ -41,7 +40,6 @@ public class ModListHelper {
|
||||
{
|
||||
tryAddFile(modFile, null, modFile);
|
||||
}
|
||||
args.remove("--mods");
|
||||
}
|
||||
}
|
||||
private static void parseListFile(String listFile) {
|
||||
@@ -72,7 +70,7 @@ public class ModListHelper {
|
||||
FMLRelaunchLog.info("Failed to find the specified repository root %s", modList.repositoryRoot);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (String s : modList.modRef)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@@ -91,7 +89,7 @@ public class ModListHelper {
|
||||
}
|
||||
}
|
||||
private static void tryAddFile(String modFileName, File repoRoot, String descriptor) {
|
||||
File modFile = repoRoot != null ? new File(repoRoot,modFileName) : new File(modFileName);
|
||||
File modFile = repoRoot != null ? new File(repoRoot,modFileName) : new File(modFileName);
|
||||
if (!modFile.exists())
|
||||
{
|
||||
FMLRelaunchLog.info("Failed to find mod file %s (%s)", descriptor, modFile.getAbsolutePath());
|
||||
|
||||
Reference in new issue
Block a user