package gq.cestaberous.supernaturalflora;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.Item;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;

@Mod(modid = "snf", name = "Supernatural Flora", version = "1.0")
public class SupernaturalFlora {
	
	//item vars
	public static Item itemEndSight;
	public static Item itemTearVial;
	public static Item itemCondensedFlesh;
	public static Item itemPureGunpowder;
	public static Item itemBonePile;
	public static Item itemAwakeningCreeper;
	
	//block vars
	public static Block blockGraveyardSoil;
	
	@EventHandler
	public void preInit(FMLPreInitializationEvent event){
		//block and item registry and init; Furnace recipes
		//item init
		itemEndSight = new ItemEndSight().setUnlocalizedName("ItemEndSight").setTextureName("snf:itemendsight");
		itemTearVial = new ItemTearVial().setUnlocalizedName("ItemTearVial").setTextureName("snf:itemtearvial");
		itemCondensedFlesh = new ItemCondensedFlesh().setUnlocalizedName("ItemCondensedFlesh").setTextureName("snf:itemcondensedflesh");
		itemPureGunpowder = new ItemPureGunpowder().setUnlocalizedName("ItemPureGunpowder").setTextureName("snf:itempuregunpowder");
		itemBonePile = new ItemBonePile().setUnlocalizedName("ItemBonePile").setTextureName("snf:itembonepile");
		itemAwakeningCreeper = new ItemAwakeningCreeper();
		//block init
		blockGraveyardSoil = new BlockGraveyardSoil(Material.grass).setBlockName("BlockGraveyardSoil").setBlockTextureName("snf:blockgraveyardsoil");
		//item registry
		GameRegistry.registerItem(itemEndSight, itemEndSight.getUnlocalizedName().substring(5));
		GameRegistry.registerItem(itemTearVial, itemTearVial.getUnlocalizedName().substring(5));
		GameRegistry.registerItem(itemCondensedFlesh, itemCondensedFlesh.getUnlocalizedName().substring(5));
		GameRegistry.registerItem(itemPureGunpowder, itemPureGunpowder.getUnlocalizedName().substring(5));
		GameRegistry.registerItem(itemBonePile, itemBonePile.getUnlocalizedName().substring(5));
		//block registry
		GameRegistry.registerBlock(blockGraveyardSoil, blockGraveyardSoil.getUnlocalizedName().substring(5));
		
	}
		
	@EventHandler
	public void init(FMLInitializationEvent event){
		//proxy, tile entity, entity, GUI, packet init and handling
		//recipes
	}
	
	@EventHandler
	public void postInit(FMLPostInitializationEvent event){
		
	}
}
