package com.kihira.corruption;

import com.kihira.corruption.common.EventHandler;
import com.kihira.corruption.common.TickHandler;
import com.kihira.corruption.common.corruption.BlockTeleportCorruption;
import com.kihira.corruption.common.corruption.CorruptionRegistry;
import com.kihira.corruption.common.corruption.StoneSkinCorruption;
import com.kihira.corruption.common.corruption.WaterAllergyCorruption;
import com.kihira.corruption.common.network.PacketEventHandler;
import com.kihira.corruption.proxy.CommonProxy;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.FMLEventChannel;
import cpw.mods.fml.common.network.NetworkRegistry;
import net.minecraftforge.common.MinecraftForge;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

@Mod(name = "Corruption", modid = "corruption")
public class Corruption {

    @SidedProxy(clientSide = "com.kihira.corruption.proxy.ClientProxy", serverSide = "com.kihira.corruption.proxy.ClientProxy")
    public static CommonProxy proxy;

    public static boolean isCorruptionActiveGlobal = true;

    public static final Logger logger = LogManager.getLogger("Corruption");
    public static final FMLEventChannel eventChannel = NetworkRegistry.INSTANCE.newEventDrivenChannel("corruption");

    @Mod.EventHandler
    public void preInit(FMLPreInitializationEvent e) {
        FMLCommonHandler.instance().bus().register(new TickHandler());
        MinecraftForge.EVENT_BUS.register(new EventHandler());

        CorruptionRegistry.registerCorruptionEffect(BlockTeleportCorruption.class);
        CorruptionRegistry.registerCorruptionEffect(WaterAllergyCorruption.class);
        CorruptionRegistry.registerCorruptionEffect(StoneSkinCorruption.class);

        eventChannel.register(new PacketEventHandler());
    }
}

@@ -843,16 +843,121 @@
 tForge;%0A
+import net.minecraftforge.common.config.Configuration;%0Aimport net.minecraftforge.common.config.Property;%0A
 import o
@@ -988,24 +988,24 @@
 LogManager;%0A
-
 import org.a
@@ -1033,16 +1033,38 @@
 ogger;%0A%0A
+import java.io.File;%0A%0A
 @Mod(nam
@@ -1356,16 +1356,174 @@
  true;%0A%0A
+    public static boolean isEnabledBlockTeleportCorr;%0A    public static boolean isEnabledStoneskinCorr;%0A    public static boolean isEnabledWaterAllergyCorr;%0A%0A
     publ
@@ -1785,16 +1785,116 @@
 nt e) %7B%0A
+        loadGeneralConfig(e.getSuggestedConfigurationFile());%0A        registerCorruptionEffects();%0A%0A
         
@@ -2016,24 +2016,837 @@
 andler());%0A%0A
+        eventChannel.register(new PacketEventHandler());%0A    %7D%0A%0A    private void loadGeneralConfig(File file) %7B%0A        Configuration config = new Configuration(file);%0A        Property prop;%0A%0A        config.load();%0A%0A        prop = config.get(Configuration.CATEGORY_GENERAL, %22Enable Block Teleport Corruption Effect%22, true);%0A        isEnabledBlockTeleportCorr = prop.getBoolean(true);%0A        prop = config.get(Configuration.CATEGORY_GENERAL, %22Enable Stone Skin Corruption Effect%22, true);%0A        isEnabledStoneskinCorr = prop.getBoolean(true);%0A        prop = config.get(Configuration.CATEGORY_GENERAL, %22Enable Water Allergy Corruption Effect%22, true);%0A        isEnabledWaterAllergyCorr = prop.getBoolean(true);%0A%0A        if (config.hasChanged()) config.save();%0A    %7D%0A%0A    private void registerCorruptionEffects() %7B%0A
         Corr
@@ -2992,32 +2992,32 @@
 ruption.class);%0A
+
         Corrupti
@@ -3083,66 +3083,8 @@
 ss);
-%0A%0A        eventChannel.register(new PacketEventHandler());
 %0A   

Allow corruption effects to be toggled