|
43 | 43 | import java.io.*; |
44 | 44 | import java.lang.reflect.InvocationTargetException; |
45 | 45 | import java.net.MalformedURLException; |
| 46 | +import java.net.URI; |
| 47 | +import java.net.URISyntaxException; |
46 | 48 | import java.security.cert.Certificate; |
47 | 49 | import java.util.*; |
48 | 50 | import java.util.function.ToIntFunction; |
@@ -239,6 +241,22 @@ public static void handleLaunch(File mcDir, LaunchClassLoader classLoader, FMLTw |
239 | 241 | } |
240 | 242 |
|
241 | 243 | FMLLog.log.debug("All fundamental core mods are successfully located"); |
| 244 | + // Add extra classpath in advanced so fml.coreMods.load works |
| 245 | + if (System.getProperty("crl.dev.extrapath") != null) |
| 246 | + { |
| 247 | + for (String path : System.getProperty("crl.dev.extrapath").split(File.pathSeparator)) |
| 248 | + { |
| 249 | + try |
| 250 | + { |
| 251 | + Launch.classLoader.addURL(new URI(path).toURL()); |
| 252 | + FMLLog.log.debug("Adding extra path {} to class path", path); |
| 253 | + } |
| 254 | + catch (MalformedURLException | URISyntaxException e) |
| 255 | + { |
| 256 | + FMLLog.log.error("Failed to add path {} to class path, this souldn't happen!", path, e); |
| 257 | + } |
| 258 | + } |
| 259 | + } |
242 | 260 | // Now that we have the root plugins loaded - lets see what else might |
243 | 261 | // be around |
244 | 262 | String commandLineCoremods = System.getProperty("fml.coreMods.load", ""); |
@@ -332,12 +350,7 @@ private static void discoverCoreMods(File mcDir, LaunchClassLoader classLoader) |
332 | 350 | { |
333 | 351 | if (coreMod.isDirectory()) |
334 | 352 | { |
335 | | - FMLLog.log.debug("Coremod candidacy {} is a directory, considering as folder mod", coreMod); |
336 | | - try { |
337 | | - Launch.classLoader.addURL(coreMod.toURI().toURL()); |
338 | | - } catch (MalformedURLException e) { |
339 | | - FMLLog.log.error("Coremod candidacy {} has a malformed URL", coreMod); |
340 | | - } |
| 353 | + FMLLog.log.debug("Ignoring folder {} in coremod searching", coreMod); |
341 | 354 | continue; |
342 | 355 | } |
343 | 356 | FMLLog.log.debug("Examining for coremod candidacy {}", coreMod.getName()); |
|
0 commit comments