diff --git a/src/main/java/at/ridgo8/moreoverlays/lightoverlay/LightOverlayHandler.java b/src/main/java/at/ridgo8/moreoverlays/lightoverlay/LightOverlayHandler.java index 192c500..40061d3 100644 --- a/src/main/java/at/ridgo8/moreoverlays/lightoverlay/LightOverlayHandler.java +++ b/src/main/java/at/ridgo8/moreoverlays/lightoverlay/LightOverlayHandler.java @@ -5,7 +5,6 @@ import at.ridgo8.moreoverlays.api.lightoverlay.ILightScanner; import at.ridgo8.moreoverlays.api.lightoverlay.LightOverlayReloadHandlerEvent; import at.ridgo8.moreoverlays.config.Config; -import net.minecraft.client.Options; import net.minecraft.client.Minecraft; import net.minecraftforge.client.event.RenderLevelLastEvent; import net.minecraftforge.common.MinecraftForge; @@ -16,12 +15,9 @@ public class LightOverlayHandler { - private static boolean OPTIFINE = false; private static boolean enabled = false; private static ILightRenderer renderer = null; private static ILightScanner scanner = null; - private static boolean OptifineCheckDone; - private static boolean setBobbing = false; public static void init() { MinecraftForge.EVENT_BUS.register(new LightOverlayHandler()); @@ -42,18 +38,6 @@ public static void setEnabled(boolean enabled) { scanner.clear(); } LightOverlayHandler.enabled = enabled; - if(!OptifineCheckDone){ - detectOptifine(); - } - if(OPTIFINE){ - Options settings = Minecraft.getInstance().options; - if(enabled){ - setBobbing = settings.bobView; - settings.bobView = false; - } else{ - settings.bobView = setBobbing; - } - } } public static void reloadHandler() { @@ -107,17 +91,5 @@ public void onClientTick(TickEvent.ClientTickEvent event) { (Minecraft.getInstance().screen == null || !Minecraft.getInstance().screen.isPauseScreen())) { scanner.update(Minecraft.getInstance().player); } - - } - - private static void detectOptifine(){ - try { - Class.forName("optifine.ZipResourceProvider"); - OPTIFINE = true; - OptifineCheckDone = true; - } catch (final ClassNotFoundException e) { - OPTIFINE = false; - OptifineCheckDone = true; - } } }