mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 08:54:12 +00:00
Abort cloak render with Optifine.
This commit is contained in:
1 parent
e763bb6363
commit
cc241aab67
2 files changed
+7
-2
No files matched your search
@@ -10,6 +10,7 @@ import javax.swing.ImageIcon;
|
||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import tconstruct.util.EnvironmentChecks;
|
||||
|
||||
public class EventCloakRender
|
||||
{
|
||||
@@ -32,7 +33,7 @@ public class EventCloakRender
|
||||
@ForgeSubscribe
|
||||
public void onPreRenderSpecials (RenderPlayerEvent.Specials.Pre event)
|
||||
{
|
||||
if (Loader.isModLoaded("shadersmod"))
|
||||
if (Loader.isModLoaded("shadersmod") || EnvironmentChecks.hasOptifine)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,9 @@ import java.util.List;
|
||||
public class EnvironmentChecks
|
||||
{
|
||||
|
||||
// Used for aborting cloak renders with Optifine present (it misbehaves)
|
||||
public static boolean hasOptifine = false;
|
||||
|
||||
private EnvironmentChecks()
|
||||
{
|
||||
} // Singleton
|
||||
@@ -33,8 +36,9 @@ public class EnvironmentChecks
|
||||
|
||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT && FMLClientHandler.instance().hasOptifine() || Loader.isModLoaded("optifine"))
|
||||
{
|
||||
TConstruct.logger.severe("[Environment Checks] Optifine detected. This is a Bad Thing(tm) and can crash Minecraft due to an Optifine bug during TCon armor renders!");
|
||||
TConstruct.logger.severe("[Environment Checks] Optifine detected. This is a Bad Thing(tm) and can crash Minecraft due to an Optifine bug during TCon armor renders! Capes also disabled.");
|
||||
modIds.add("optifine");
|
||||
hasOptifine = true;
|
||||
}
|
||||
|
||||
try
|
||||
|
||||
Reference in new issue
Block a user