// Path: src/main/java/com/dta/extracarts/Module.java
// public abstract class Module {
// 	private Boolean isActive = true;
// 
// 	public abstract String getModuleName();
// 
// 	public Boolean areRequirementsMet() {
// 		return true;
// 	}
// 
// 	public void setIsActive(Boolean isActive) {
// 		this.isActive = isActive;
// 	}
// 
// 	public Boolean getIsActive() {
// 		return isActive;
// 	}
// 
// 	public void init(FMLPreInitializationEvent event) {}
// 	public void load(FMLInitializationEvent event) {}
// 	public void postInit(FMLPostInitializationEvent event) {}
// }
// 
// Path: src/main/java/com/dta/extracarts/mods/ironchest/events/ECEventHandler.java
// public class ECEventHandler {
// 
// 	private Item WoodIronUpgrade = GameRegistry.findItem("IronChest", "woodIronUpgrade");
// 	private Item WoodCopperUpgrade = GameRegistry.findItem("IronChest", "woodCopperUpgrade");
// 	
// 	@SubscribeEvent
// 	public void MinecartInteractEvent(MinecartInteractEvent event) {
// 		if (event.entity instanceof EntityMinecartChest) {
// 			ItemStack curItem = event.player.getCurrentEquippedItem();
// 	    	EntityMinecartChest oldCart = (EntityMinecartChest) event.entity;
// 	    	if (curItem != null && curItem.getItem() == WoodIronUpgrade) {
// 	    		EntityIronChestCart ironCart = new EntityIronChestCart(oldCart.worldObj);
// 	    		ironCart.copyDataFrom(event.entity, true);
// 	    		ironCart.setDisplayTileData(0);
// 	 	        if (!event.entity.worldObj.isRemote) {
// 	 	           	oldCart.worldObj.spawnEntityInWorld(ironCart);
// 	 	        }
// 	 	        for (int i = 0; i < oldCart.getSizeInventory(); i++) {
// 	 	        	oldCart.setInventorySlotContents(i, null);
// 	 	        }
// 	    		oldCart.setDead();
// 	    		event.player.destroyCurrentEquippedItem();
// 	    		event.setCanceled(true);
// 	    	} else if (curItem != null && curItem.getItem() == WoodCopperUpgrade) {	
// 	    		EntityCopperChestCart copperCart = new EntityCopperChestCart(oldCart.worldObj);
// 	    		copperCart.copyDataFrom(event.entity, true);
// 	    		copperCart.setDisplayTileData(3);
// 	 	        if (!event.entity.worldObj.isRemote) {
// 	 	        	oldCart.worldObj.spawnEntityInWorld(copperCart);
// 	 	        }
// 	 	        for (int i = 0; i < oldCart.getSizeInventory(); i++) {
// 	 	          	oldCart.setInventorySlotContents(i, null);
// 	 	        }
// 	    		oldCart.setDead();
// 	    		event.player.destroyCurrentEquippedItem();
// 	    		event.setCanceled(true);
// 	    	}
// 	    }
// 	}
// }


import net.minecraftforge.common.MinecraftForge;
import com.dta.extracarts.Module;
import com.dta.extracarts.mods.ironchest.events.ECEventHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
package com.dta.extracarts.mods.ironchest;




/**
 * Created by Skylar on 10/17/2014.
 */
public class IronChestModule extends Module {
	@Override
    public String getModuleName() {
        return "IronChest";
    }

	@Override
	public Boolean areRequirementsMet() {
		return Loader.isModLoaded("IronChest");
	}

	@Override
	public void load(FMLInitializationEvent event) {
// Path: src/main/java/com/dta/extracarts/Module.java
// public abstract class Module {
// 	private Boolean isActive = true;
// 
// 	public abstract String getModuleName();
// 
// 	public Boolean areRequirementsMet() {
// 		return true;
// 	}
// 
// 	public void setIsActive(Boolean isActive) {
// 		this.isActive = isActive;
// 	}
// 
// 	public Boolean getIsActive() {
// 		return isActive;
// 	}
// 
// 	public void init(FMLPreInitializationEvent event) {}
// 	public void load(FMLInitializationEvent event) {}
// 	public void postInit(FMLPostInitializationEvent event) {}
// }
// 
// Path: src/main/java/com/dta/extracarts/mods/ironchest/events/ECEventHandler.java
// public class ECEventHandler {
// 
// 	private Item WoodIronUpgrade = GameRegistry.findItem("IronChest", "woodIronUpgrade");
// 	private Item WoodCopperUpgrade = GameRegistry.findItem("IronChest", "woodCopperUpgrade");
// 	
// 	@SubscribeEvent
// 	public void MinecartInteractEvent(MinecartInteractEvent event) {
// 		if (event.entity instanceof EntityMinecartChest) {
// 			ItemStack curItem = event.player.getCurrentEquippedItem();
// 	    	EntityMinecartChest oldCart = (EntityMinecartChest) event.entity;
// 	    	if (curItem != null && curItem.getItem() == WoodIronUpgrade) {
// 	    		EntityIronChestCart ironCart = new EntityIronChestCart(oldCart.worldObj);
// 	    		ironCart.copyDataFrom(event.entity, true);
// 	    		ironCart.setDisplayTileData(0);
// 	 	        if (!event.entity.worldObj.isRemote) {
// 	 	           	oldCart.worldObj.spawnEntityInWorld(ironCart);
// 	 	        }
// 	 	        for (int i = 0; i < oldCart.getSizeInventory(); i++) {
// 	 	        	oldCart.setInventorySlotContents(i, null);
// 	 	        }
// 	    		oldCart.setDead();
// 	    		event.player.destroyCurrentEquippedItem();
// 	    		event.setCanceled(true);
// 	    	} else if (curItem != null && curItem.getItem() == WoodCopperUpgrade) {	
// 	    		EntityCopperChestCart copperCart = new EntityCopperChestCart(oldCart.worldObj);
// 	    		copperCart.copyDataFrom(event.entity, true);
// 	    		copperCart.setDisplayTileData(3);
// 	 	        if (!event.entity.worldObj.isRemote) {
// 	 	        	oldCart.worldObj.spawnEntityInWorld(copperCart);
// 	 	        }
// 	 	        for (int i = 0; i < oldCart.getSizeInventory(); i++) {
// 	 	          	oldCart.setInventorySlotContents(i, null);
// 	 	        }
// 	    		oldCart.setDead();
// 	    		event.player.destroyCurrentEquippedItem();
// 	    		event.setCanceled(true);
// 	    	}
// 	    }
// 	}
// }


// Path: src/main/java/com/dta/extracarts/mods/ironchest/IronChestModule.java
import net.minecraftforge.common.MinecraftForge;
import com.dta.extracarts.Module;
import com.dta.extracarts.mods.ironchest.events.ECEventHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;

package com.dta.extracarts.mods.ironchest;




/**
 * Created by Skylar on 10/17/2014.
 */
public class IronChestModule extends Module {
	@Override
    public String getModuleName() {
        return "IronChest";
    }

	@Override
	public Boolean areRequirementsMet() {
		return Loader.isModLoaded("IronChest");
	}

	@Override
	public void load(FMLInitializationEvent event) {
        MinecraftForge.EVENT_BUS.register(new ECEventHandler());