Forge will now load extra mods from mods/mod_list.json and mods/mc_version/mod_list.json.
As defined by the same json spec as --modListFile. And now if repositoryRoot is prefixed with absolute: the path will NOT be relative to the MC directory.
This commit is contained in:
parent
6ad65f4e64
commit
72f7c0be1f
1 changed files with 17 additions and 1 deletions
|
@ -62,11 +62,27 @@ public class ModListHelper {
|
|||
tryAddFile(modFile, null, modFile);
|
||||
}
|
||||
}
|
||||
|
||||
String[] extras = new String[]
|
||||
{
|
||||
"mods/mod_list.json",
|
||||
"mods/" + FMLInjectionData.mccversion + "/mod_list.json"
|
||||
};
|
||||
|
||||
for (String extra : extras)
|
||||
{
|
||||
if ((new File(mcDirectory, extra)).exists())
|
||||
parseListFile(extra);
|
||||
}
|
||||
|
||||
}
|
||||
private static void parseListFile(String listFile) {
|
||||
File f;
|
||||
try
|
||||
{
|
||||
if (listFile.startsWith("absolute:"))
|
||||
f = new File(listFile.substring(9)).getCanonicalFile();
|
||||
else
|
||||
f = new File(mcDirectory, listFile).getCanonicalFile();
|
||||
} catch (IOException e2)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue