mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 19:59:42 +00:00
Some tidyup of the PR
This commit is contained in:
1 parent
2b3cdaa752
commit
1fa358ccee
1 file changed
+7
-6
@@ -95,9 +95,10 @@ public class FMLModContainer implements ModContainer
|
||||
this.candidate = container;
|
||||
this.descriptor = modDescriptor;
|
||||
this.eventMethods = ArrayListMultimap.create();
|
||||
|
||||
|
||||
this.modLanguage = (String) modDescriptor.get("modLanguage");
|
||||
if (modDescriptor.get("modLanguageAdapter").equals(""))
|
||||
String languageAdapterType = (String)modDescriptor.get("modLanguageAdapter");
|
||||
if (Strings.isNullOrEmpty(languageAdapterType))
|
||||
{
|
||||
this.languageAdapter = "scala".equals(modLanguage) ? new ILanguageAdapter.ScalaAdapter() : new ILanguageAdapter.JavaAdapter();
|
||||
}
|
||||
@@ -105,13 +106,13 @@ public class FMLModContainer implements ModContainer
|
||||
{
|
||||
try
|
||||
{
|
||||
this.languageAdapter = (ILanguageAdapter)Class.forName((String)modDescriptor.get("modLanguageAdapter"), true, Loader.instance().getModClassLoader()).newInstance();
|
||||
FMLLog.finer("Using custom language adapter %s (for %s)", this.languageAdapter, this.className);
|
||||
this.languageAdapter = (ILanguageAdapter)Class.forName(languageAdapterType, true, Loader.instance().getModClassLoader()).newInstance();
|
||||
FMLLog.finer("Using custom language adapter %s (type %s) for %s (modid %s)", this.languageAdapter, languageAdapterType, this.className, getModId());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
FMLLog.severe("Error constructing custom mod language adapter %s (referenced by %s): %s", modDescriptor.get("modLanguageAdapter"), this.className, ex);
|
||||
FMLCommonHandler.instance().exitJava(1, true);
|
||||
FMLLog.log(Level.ERROR, ex, "Error constructing custom mod language adapter %s (referenced by %s) (modid: %s)", languageAdapterType, this.className, getModId());
|
||||
throw new LoaderException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user