// Path: src/main/java/com/foodcraft/util/FcUtil.java
// public class FcUtil {
// 
//     public static void dropItemAsEntity(World world, double posX, double posY, double posZ, ItemStack itemStack) {
// 
//         if (itemStack == null) {
//             return;
//         }
//         double f = 0.7D;
//         double dx = world.rand.nextFloat() * f + (1.0D - f) * 0.5D;
//         double dy = world.rand.nextFloat() * f + (1.0D - f) * 0.5D;
//         double dz = world.rand.nextFloat() * f + (1.0D - f) * 0.5D;
// 
//         EntityItem entityItem = new EntityItem(world, posX + dx, posY + dy, posZ + dz, itemStack.copy());
//         entityItem.setDefaultPickupDelay();
//         world.spawnEntityInWorld(entityItem);
//     }
// 
//     public static void removeRecipe(ItemStack ItemStack) {
//         List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
//         for (int i = 0; i < recipes.size(); i++) {
//             IRecipe tmpRecipe = recipes.get(i);
//             ItemStack recipeResult = tmpRecipe.getRecipeOutput();
//             if (ItemStack.areItemStacksEqual(ItemStack, recipeResult)) recipes.remove(i--);
//         }
//     }
// }


import com.foodcraft.util.FcUtil;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.WeightedRandomChestContent;
import net.minecraftforge.common.ChestGenHooks;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
package com.foodcraft.init;




public class FoodcraftRecipe {
    public static class FcGameRegistry extends GameRegistry {
        public static void addRecipe(ItemStack output, Object... params)
        {
            addShapedRecipe(output, params);
        }
        public static IRecipe addShapedRecipe(ItemStack output, Object... params)
        {
            CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(output, params));
            return new ShapedOreRecipe(output, params);
        }
        public static void addShapelessRecipe(ItemStack output, Object... params)
        {
            CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(output, params));
        }
    }

    public static void init() {
        Items.egg.setMaxStackSize(64);
        Items.snowball.setMaxStackSize(64);

        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(FoodcraftItems.ItemTiepian, 16), "###", "#X#","###", '#',"ingotIron",'X',"stone"));
        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(FoodcraftItems.ItemCaidao, 1), "## ", "## ","X  ", '#',FoodcraftItems.ItemTiepian,'X',"stickWood"));

        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(FoodcraftItems.ItemCaidaoHJ, 1), "## ", "## ","X  ", '#',"ingotGold",'X',"stickWood"));
        FcGameRegistry.addRecipe(new ItemStack(FoodcraftItems.ItemCaidaoZS, 1), "## ", "## ","X  ", '#',Items.diamond,'X',Items.stick);
        FcGameRegistry.addRecipe(new ItemStack(FoodcraftItems.ItemCaidaoLBS, 1), "## ", "## ","X  ", '#',Items.emerald,'X',Items.stick);

// Path: src/main/java/com/foodcraft/util/FcUtil.java
// public class FcUtil {
// 
//     public static void dropItemAsEntity(World world, double posX, double posY, double posZ, ItemStack itemStack) {
// 
//         if (itemStack == null) {
//             return;
//         }
//         double f = 0.7D;
//         double dx = world.rand.nextFloat() * f + (1.0D - f) * 0.5D;
//         double dy = world.rand.nextFloat() * f + (1.0D - f) * 0.5D;
//         double dz = world.rand.nextFloat() * f + (1.0D - f) * 0.5D;
// 
//         EntityItem entityItem = new EntityItem(world, posX + dx, posY + dy, posZ + dz, itemStack.copy());
//         entityItem.setDefaultPickupDelay();
//         world.spawnEntityInWorld(entityItem);
//     }
// 
//     public static void removeRecipe(ItemStack ItemStack) {
//         List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
//         for (int i = 0; i < recipes.size(); i++) {
//             IRecipe tmpRecipe = recipes.get(i);
//             ItemStack recipeResult = tmpRecipe.getRecipeOutput();
//             if (ItemStack.areItemStacksEqual(ItemStack, recipeResult)) recipes.remove(i--);
//         }
//     }
// }


// Path: src/main/java/com/foodcraft/init/FoodcraftRecipe.java
import com.foodcraft.util.FcUtil;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.WeightedRandomChestContent;
import net.minecraftforge.common.ChestGenHooks;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;

package com.foodcraft.init;




public class FoodcraftRecipe {
    public static class FcGameRegistry extends GameRegistry {
        public static void addRecipe(ItemStack output, Object... params)
        {
            addShapedRecipe(output, params);
        }
        public static IRecipe addShapedRecipe(ItemStack output, Object... params)
        {
            CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(output, params));
            return new ShapedOreRecipe(output, params);
        }
        public static void addShapelessRecipe(ItemStack output, Object... params)
        {
            CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(output, params));
        }
    }

    public static void init() {
        Items.egg.setMaxStackSize(64);
        Items.snowball.setMaxStackSize(64);

        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(FoodcraftItems.ItemTiepian, 16), "###", "#X#","###", '#',"ingotIron",'X',"stone"));
        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(FoodcraftItems.ItemCaidao, 1), "## ", "## ","X  ", '#',FoodcraftItems.ItemTiepian,'X',"stickWood"));

        GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(FoodcraftItems.ItemCaidaoHJ, 1), "## ", "## ","X  ", '#',"ingotGold",'X',"stickWood"));
        FcGameRegistry.addRecipe(new ItemStack(FoodcraftItems.ItemCaidaoZS, 1), "## ", "## ","X  ", '#',Items.diamond,'X',Items.stick);
        FcGameRegistry.addRecipe(new ItemStack(FoodcraftItems.ItemCaidaoLBS, 1), "## ", "## ","X  ", '#',Items.emerald,'X',Items.stick);

        FcUtil.removeRecipe(new ItemStack(Items.cake));