diff --git a/src/main/java/com/sinthoras/hydroenergy/HETags.java b/src/main/java/com/sinthoras/hydroenergy/HETags.java index 7890a13..0b4bb5e 100644 --- a/src/main/java/com/sinthoras/hydroenergy/HETags.java +++ b/src/main/java/com/sinthoras/hydroenergy/HETags.java @@ -8,7 +8,7 @@ public class HETags { public static final String MODID = "GRADLETOKEN_MODID"; public static final String MODNAME = "GRADLETOKEN_MODNAME"; public static final String VERSION = "GRADLETOKEN_VERSION"; - public static final String GROUPNAME = "GRADLETOKEN_GROUPNAME"; + public static final String GROUPNAME = "com.sinthoras.hydroenergy"; public static final String DEPENDENCIES = "required-after: gregtech;" + "required-after: tectech@[5.0,)"; public static final String waterLevel = "walv"; diff --git a/src/main/java/com/sinthoras/hydroenergy/config/HEConfig.java b/src/main/java/com/sinthoras/hydroenergy/config/HEConfig.java index fd940af..9e7f849 100644 --- a/src/main/java/com/sinthoras/hydroenergy/config/HEConfig.java +++ b/src/main/java/com/sinthoras/hydroenergy/config/HEConfig.java @@ -8,6 +8,7 @@ import com.sinthoras.hydroenergy.HEUtil; +import cpw.mods.fml.common.Loader; import gregtech.api.enums.GT_Values; public class HEConfig { @@ -120,6 +121,8 @@ public static void syncronizeConfiguration(java.io.File configurationFile) { + "mod. But be warned: you will have limited render capabilities!"); useLimitedRendering = useLimitedRenderingProperty.getBoolean(); + if (Loader.isModLoaded("angelica")) useLimitedRendering = true; + Property forceOpenGLProperty = configuration.get( Categories.general, "forceOpenGL", diff --git a/src/main/java/com/sinthoras/hydroenergy/hooks/HEHooksFML.java b/src/main/java/com/sinthoras/hydroenergy/hooks/HEHooksFML.java index 9c70781..363b7fa 100644 --- a/src/main/java/com/sinthoras/hydroenergy/hooks/HEHooksFML.java +++ b/src/main/java/com/sinthoras/hydroenergy/hooks/HEHooksFML.java @@ -18,6 +18,7 @@ public class HEHooksFML { private float waterLevel = 85.0f; private int sign = 1; + private boolean isLoggedIn = false; @SubscribeEvent public void onEvent(ServerTickEvent event) { @@ -41,16 +42,23 @@ public void onEvent(PlayerLoggedInEvent event) { HEServer.instance.synchronizeClient(event); } + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void onEvent(FMLNetworkEvent.ClientConnectedToServerEvent event) { + isLoggedIn = true; + } + @SideOnly(Side.CLIENT) @SubscribeEvent public void onEvent(FMLNetworkEvent.ClientDisconnectionFromServerEvent event) { HEClient.onDisconnect(); + isLoggedIn = false; } @SideOnly(Side.CLIENT) @SubscribeEvent public void onEvent(TickEvent.ClientTickEvent event) { - if (event.phase == TickEvent.Phase.END) { + if (event.phase == TickEvent.Phase.END && isLoggedIn) { HELightManager.onTick(); } }