package com.roborave.edm.tweaker;

import java.util.Arrays;

import net.minecraft.init.Blocks;
import net.minecraftforge.common.config.Configuration;

import com.roborave.edm.tweaker.config.MCConfiguration;
import com.roborave.edm.tweaker.helper.LogHelper;
import com.roborave.edm.tweaker.helper.ObfHelper;
import com.roborave.edm.tweaker.packager.Packager;

import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.ModMetadata;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
@Packager(getName=Main.NAME, getVersion=Main.VERSION,getBaseDirectories = { "com.roborave.edm" }, getClasses = { "com.roborave" })
@Mod(modid = Main.MODID, version = Main.VERSION,name=Main.NAME)
public class Main
{
	@Mod.Instance(value=Main.MODID)
	public Main instance;
	
	@Mod.Metadata(Main.MODID)
	public ModMetadata meta;

	public static boolean hardMode;

	private String descriptionDEV="turn this on for hard mode which will make the swords unenchanted. WIP";

	private boolean test=false;
    
	public static final String MODID = "Tweaker";
	public static final String VERSION = "0.2.8";
    	public static final String NAME="edmtweaker";
    
    @Mod.EventHandler
    public void PreInit(FMLPreInitializationEvent event)
    {
    	meta = event.getModMetadata();
	meta.autogenerated = false;
	meta.credits = "(C)2014-2015";
	meta.authorList = Arrays.asList("Roborave");
	meta.modId=MODID;
	meta.name=NAME;
	meta.version=VERSION;
	meta.description="Mod that helps fixes the MANY errors in my mods";
		
	MCConfiguration.CreateConfig(event, Main.MODID, Main.NAME.toUpperCase());
	Main.hardMode = MCConfiguration.config.getBoolean(Configuration.CATEGORY_GENERAL, "HardMode", this.test, this.descriptionDEV);
	MCConfiguration.config.save();
	
	if(ObfHelper.isObfuscatedEnv()==false)
	{
		LogHelper.info("Found Obfuscated Envorment", new Object[0]);
		try {
			LogHelper.info("%s", Blocks.class.getField("air").toString());
		} catch (NoSuchFieldException e) {
			e.printStackTrace();
		} catch (SecurityException e) {
			e.printStackTrace();
		}
	}
    }
    
    @EventHandler
    public void Postinit(FMLPostInitializationEvent event)
    {
    	if(Loader.isModLoaded("Extra_Diamonds_Mod"))
    	{
    		try{
    			Tweaker.load();
    		}catch (Exception e){
    			e.printStackTrace();
		}
    	}
    }
}

@@ -718,16 +718,24 @@
 rave.edm
+.tweaker
 %22 %7D, get

Update Main.java