// Path: src/main/java/com/dta/extracarts/mods/mfr/MFRItems.java
// public class MFRItems {
// 
// 		public static Item MFRCart;
// 		private static IRecipe dsuCart = new DSUCartRecipe();
// 		
// 		public static void init() {
// 			MFRCart = new ItemMFRCart();
// 		}
// 		
// 		public static void registerItems() {
// 			GameRegistry.registerItem(MFRCart, ModInfo.MODID + "_" + MFRCart.getUnlocalizedName().substring(5));
// 		}
// 		
// 		public static void registerRecipes() {
// 			GameRegistry.addRecipe(dsuCart);
// 		}
// }
// 
// Path: src/main/java/com/dta/extracarts/mods/mfr/MFRModule.java
// public class MFRModule extends Module {
// 	public static FakeDSUBlock fakeDSUBlock;
// 
// 	@Override
//     public String getModuleName() {
//         return "MFR";
//     }
// 
// 	public Boolean areRequirementsMet() {
// 		return Loader.isModLoaded("MineFactoryReloaded");
// 	}
// 
// 	@Override
// 	public void init(FMLPreInitializationEvent event) {
// 		fakeDSUBlock = new FakeDSUBlock();
// 		FakeBlockRegistry.registerSubBlock(fakeDSUBlock);
// 	}
// 
// 	@Override
// 	public void postInit(FMLPostInitializationEvent event) {
// 		MFRItems.init();
// 		MFRItems.registerItems();
// 		MFRItems.registerRecipes();
// 		EntityRegistry.registerModEntity(EntityDSUCart.class, "EntityDSUCart", 9, ExtraCarts.instance, 80, 3, true);
// 	}
// }


import com.dta.extracarts.mods.mfr.MFRItems;
import com.dta.extracarts.mods.mfr.MFRModule;
import net.minecraft.block.Block;
import net.minecraft.init.Items;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import cpw.mods.fml.common.registry.GameRegistry;
        int others = 0;
        for (int k1 = 0; k1 < inventorycrafting.getSizeInventory(); ++k1) {
        	ItemStack itemstack = inventorycrafting.getStackInSlot(k1);
        	if (itemstack != null) {
        		if (itemstack.getItem() == Items.minecart) {
        			++cart;
        		} else if (itemstack.getItem() == dsuStack.getItem() && itemstack.getItemDamage() == 3) {
         			++dsu;
        		} else {
        			++others;
        		}
        	}
        }
      	if (cart != 1 || dsu != 1 || others > 0) {
    		return false;
    	} else {
    		return true;
    	}
    	
    	
	}

	@Override
	public ItemStack getCraftingResult(InventoryCrafting inventorycrafting) {
		ItemStack dsu = null;
		for (int x = 0; x < inventorycrafting.getSizeInventory(); ++x) {
			if (inventorycrafting.getStackInSlot(x) != null && inventorycrafting.getStackInSlot(x).getItem() == dsuStack.getItem()) {
				dsu = inventorycrafting.getStackInSlot(x).copy();
			}
		}
// Path: src/main/java/com/dta/extracarts/mods/mfr/MFRItems.java
// public class MFRItems {
// 
// 		public static Item MFRCart;
// 		private static IRecipe dsuCart = new DSUCartRecipe();
// 		
// 		public static void init() {
// 			MFRCart = new ItemMFRCart();
// 		}
// 		
// 		public static void registerItems() {
// 			GameRegistry.registerItem(MFRCart, ModInfo.MODID + "_" + MFRCart.getUnlocalizedName().substring(5));
// 		}
// 		
// 		public static void registerRecipes() {
// 			GameRegistry.addRecipe(dsuCart);
// 		}
// }
// 
// Path: src/main/java/com/dta/extracarts/mods/mfr/MFRModule.java
// public class MFRModule extends Module {
// 	public static FakeDSUBlock fakeDSUBlock;
// 
// 	@Override
//     public String getModuleName() {
//         return "MFR";
//     }
// 
// 	public Boolean areRequirementsMet() {
// 		return Loader.isModLoaded("MineFactoryReloaded");
// 	}
// 
// 	@Override
// 	public void init(FMLPreInitializationEvent event) {
// 		fakeDSUBlock = new FakeDSUBlock();
// 		FakeBlockRegistry.registerSubBlock(fakeDSUBlock);
// 	}
// 
// 	@Override
// 	public void postInit(FMLPostInitializationEvent event) {
// 		MFRItems.init();
// 		MFRItems.registerItems();
// 		MFRItems.registerRecipes();
// 		EntityRegistry.registerModEntity(EntityDSUCart.class, "EntityDSUCart", 9, ExtraCarts.instance, 80, 3, true);
// 	}
// }


// Path: src/main/java/com/dta/extracarts/mods/mfr/items/crafting/DSUCartRecipe.java
import com.dta.extracarts.mods.mfr.MFRItems;
import com.dta.extracarts.mods.mfr.MFRModule;
import net.minecraft.block.Block;
import net.minecraft.init.Items;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import cpw.mods.fml.common.registry.GameRegistry;

        int others = 0;
        for (int k1 = 0; k1 < inventorycrafting.getSizeInventory(); ++k1) {
        	ItemStack itemstack = inventorycrafting.getStackInSlot(k1);
        	if (itemstack != null) {
        		if (itemstack.getItem() == Items.minecart) {
        			++cart;
        		} else if (itemstack.getItem() == dsuStack.getItem() && itemstack.getItemDamage() == 3) {
         			++dsu;
        		} else {
        			++others;
        		}
        	}
        }
      	if (cart != 1 || dsu != 1 || others > 0) {
    		return false;
    	} else {
    		return true;
    	}
    	
    	
	}

	@Override
	public ItemStack getCraftingResult(InventoryCrafting inventorycrafting) {
		ItemStack dsu = null;
		for (int x = 0; x < inventorycrafting.getSizeInventory(); ++x) {
			if (inventorycrafting.getStackInSlot(x) != null && inventorycrafting.getStackInSlot(x).getItem() == dsuStack.getItem()) {
				dsu = inventorycrafting.getStackInSlot(x).copy();
			}
		}
		ItemStack result = new ItemStack(MFRItems.MFRCart, 1, 0);