mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Fix up optifine detection properly
This commit is contained in:
1 parent
d44822b7d0
commit
4fdf2ea290
1 file changed
+14
-3
@@ -192,15 +192,26 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
{
|
||||
Class<?> optifineConfig = Class.forName("Config", false, Loader.instance().getModClassLoader());
|
||||
optifineContainer = new OptifineModContainer(optifineConfig);
|
||||
ModMetadata optifineMetadata = readMetadataFrom(Loader.instance().getModClassLoader().getResourceAsStream("optifinemod.info"), optifineContainer);
|
||||
optifineContainer.setMetadata(optifineMetadata);
|
||||
FMLCommonHandler.instance().getFMLLogger().info(String.format("Forge Mod Loader has detected optifine %s, enabling compatibility features",optifineContainer.getVersion()));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// OPTIFINE not found
|
||||
optifineContainer = null;
|
||||
}
|
||||
if (optifineContainer != null)
|
||||
{
|
||||
ModMetadata optifineMetadata;
|
||||
try
|
||||
{
|
||||
optifineMetadata = readMetadataFrom(Loader.instance().getModClassLoader().getResourceAsStream("optifinemod.info"), optifineContainer);
|
||||
optifineContainer.setMetadata(optifineMetadata);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//not available
|
||||
}
|
||||
FMLCommonHandler.instance().getFMLLogger().info(String.format("Forge Mod Loader has detected optifine %s, enabling compatibility features",optifineContainer.getVersion()));
|
||||
}
|
||||
Loader.instance().loadMods();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user