mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 13:09:59 +00:00
Slight reorganization of texture ticking - accomodate optifine
This commit is contained in:
1 parent
174d6691bd
commit
de8a5cfc8b
5 files changed
+33
-3
No files matched your search
@@ -23,6 +23,7 @@ import java.io.InputStreamReader;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@@ -187,18 +188,20 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
ReflectionHelper.detectObfuscation(World.class);
|
||||
FMLCommonHandler.instance().registerSidedDelegate(this);
|
||||
FMLRegistry.registerRegistry(new ClientRegistry());
|
||||
Loader.instance().loadMods();
|
||||
try
|
||||
{
|
||||
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;
|
||||
}
|
||||
Loader.instance().loadMods();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1037,7 +1040,10 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
|
||||
try
|
||||
{
|
||||
effect.func_783_a();
|
||||
if (optifineContainer == null)
|
||||
{
|
||||
effect.func_783_a();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -1098,4 +1104,15 @@ public class FMLClientHandler implements IFMLSidedHandler
|
||||
mods.add(optifineContainer);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getAdditionalBrandingInformation()
|
||||
{
|
||||
if (optifineContainer!=null)
|
||||
{
|
||||
return Arrays.asList(String.format("Optifine %s",optifineContainer.getVersion()));
|
||||
} else {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user