mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 13:09:59 +00:00
Fix NPE with CoreMods who do not have the new MCVersion annotation.
This commit is contained in:
1 parent
b8f72c678b
commit
11d5ac1e07
1 file changed
+9
-1
@@ -408,7 +408,15 @@ public class RelaunchLibraryManager
|
||||
classLoader.addTransformerExclusion(fmlCorePlugin);
|
||||
Class<?> coreModClass = Class.forName(fmlCorePlugin, true, classLoader);
|
||||
MCVersion requiredMCVersion = coreModClass.getAnnotation(IFMLLoadingPlugin.MCVersion.class);
|
||||
String version = requiredMCVersion.value();
|
||||
String version = "";
|
||||
if (requiredMCVersion == null)
|
||||
{
|
||||
FMLRelaunchLog.log(Level.WARNING, "The coremod %s does not have a MCVersion annotation, it may cause issues with this version of Minecraft", fmlCorePlugin);
|
||||
}
|
||||
else
|
||||
{
|
||||
version = requiredMCVersion.value();
|
||||
}
|
||||
if (!"".equals(version) && !FMLInjectionData.mccversion.equals(version))
|
||||
{
|
||||
FMLRelaunchLog.log(Level.SEVERE, "The coremod %s is requesting minecraft version %s and minecraft is %s. It will be ignored.", fmlCorePlugin, version, FMLInjectionData.mccversion);
|
||||
|
||||
Reference in new issue
Block a user