package com.detrav;

import com.detrav.commands.DetravBiomeScannerCommand;
import com.detrav.events.BlockBreakEventHandler;
import com.detrav.proxies.CommonProxy;
import com.detrav.utils.DetravCreativeTab;
import com.detrav.net.DetravNetwork;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import gregtech.api.GregTech_API;
import net.minecraft.creativetab.CreativeTabs;

@Mod(modid = DetravScannerMod.MODID, version = DetravScannerMod.VERSION,dependencies = "required-after:IC2;required-after:gregtech")
public class DetravScannerMod
{
    public static final String MODID = "detravscannermod";
    public static final String VERSION = "0.9";

    public static final CreativeTabs TAB_DETRAV = new DetravCreativeTab();

    @SidedProxy(clientSide = "com.detrav.proxies.ClientProxy", serverSide = "com.detrav.proxies.ServerProxy")
    public static CommonProxy proxy;

    @Mod.Instance(DetravScannerMod.MODID)
    public static DetravScannerMod instance;

    public  DetravScannerMod()
    {
        GregTech_API.sAfterGTPreload.add(new DetravLoader());
        new DetravNetwork();
    }
    
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
		// some example code
        //System.out.println("DIRT BLOCK >> "+Blocks.dirt.getUnlocalizedName());
        NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy );
    }

    @EventHandler
    public void onLoad(FMLInitializationEvent aEvent)
    {
        proxy.onLoad();
    }

    @EventHandler
    public void onPostLoad(FMLPostInitializationEvent aEvent) {
        proxy.onPostLoad();
        BlockBreakEventHandler.register();
    }

    @EventHandler
    public void serverLoad(FMLServerStartingEvent event)
    {
        //event.registerServerCommand(new DetravScannerCommand());
        event.registerServerCommand(new DetravBiomeScannerCommand());
    }
}

@@ -462,32 +462,92 @@
 alizationEvent;%0A
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;%0A
 import cpw.mods.
@@ -719,16 +719,71 @@
 iveTabs;
+%0Aimport net.minecraftforge.common.config.Configuration;
 %0A%0A@Mod(m
@@ -1499,13 +1499,282 @@
   %7D%0A
+%0A
     
-%0A
+@EventHandler%0A    public void preInit(FMLPreInitializationEvent event) %7B%0A        Configuration Config = new Configuration(event.getSuggestedConfigurationFile());%0A        Config.load();%0A%0A%0A        if (Config.hasChanged())%7B%0A            Config.save();%0A        %7D%0A    %7D%0A%0A    
     

Add config file