ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FoodCrafting.java

216 lines
10 KiB
Java
Raw Normal View History

2015-08-29 14:33:25 +02:00
/*
* This file ("FoodCrafting.java") is part of the Actually Additions Mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
2016-01-03 16:05:51 +01:00
* http://ellpeck.de/actaddlicense/
2015-08-29 14:33:25 +02:00
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
2016-01-03 16:05:51 +01:00
* © 2016 Ellpeck
2015-08-29 14:33:25 +02:00
*/
2016-01-05 04:47:35 +01:00
package de.ellpeck.actuallyadditions.mod.crafting;
2016-01-05 04:47:35 +01:00
import de.ellpeck.actuallyadditions.mod.config.values.ConfigCrafting;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.Util;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
2015-08-28 21:17:09 +02:00
import net.minecraft.item.crafting.IRecipe;
2016-01-07 18:20:59 +01:00
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
public class FoodCrafting{
2015-08-28 21:17:09 +02:00
public static IRecipe recipePizza;
public static IRecipe recipeHamburger;
public static IRecipe recipeBigCookie;
public static IRecipe recipeSubSandwich;
public static IRecipe recipeFrenchFry;
public static IRecipe recipeFrenchFries;
public static IRecipe recipeFishNChips;
public static IRecipe recipeCheese;
public static IRecipe recipePumpkinStew;
public static IRecipe recipeCarrotJuice;
public static IRecipe recipeSpaghetti;
public static IRecipe recipeNoodle;
public static IRecipe recipeChocolate;
public static IRecipe recipeChocolateCake;
public static IRecipe recipeToast;
2015-10-24 21:20:27 +02:00
public static IRecipe recipeChocolateToast;
public static IRecipe recipeBacon;
2015-08-28 21:17:09 +02:00
public static void init(){
ItemStack knifeStack = new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD);
2015-03-29 15:29:05 +02:00
2015-05-20 22:39:43 +02:00
//Rice Bread
if(ConfigCrafting.RICE_BREAD.isEnabled()){
2015-05-20 22:39:43 +02:00
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()),
new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal()), 1F);
}
2015-05-20 22:39:43 +02:00
//Bacon
if(ConfigCrafting.BACON.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.BACON.ordinal()),
knifeStack, new ItemStack(Items.cooked_porkchop)));
recipeBacon = Util.GetRecipes.lastIRecipe();
}
//Baguette
if(ConfigCrafting.BAGUETTE.isEnabled()){
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1,
TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 1F);
}
//Pizza
2015-08-28 21:17:09 +02:00
if(ConfigCrafting.PIZZA.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PIZZA.ordinal()),
"HKH", "MCF", " D ",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
'M', new ItemStack(Blocks.brown_mushroom),
'C', "cropCarrot",
'F', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD),
2015-03-29 15:29:05 +02:00
'K', knifeStack,
'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal())));
recipePizza = Util.GetRecipes.lastIRecipe();
2015-08-28 21:17:09 +02:00
}
//Hamburger
if(ConfigCrafting.HAMBURGER.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()),
"KT ", "CB ", " T ",
'T', new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()),
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
2015-03-29 15:29:05 +02:00
'K', knifeStack,
'B', new ItemStack(Items.cooked_beef)));
recipeHamburger = Util.GetRecipes.lastIRecipe();
}
//Big Cookie
if(ConfigCrafting.BIG_COOKIE.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.BIG_COOKIE.ordinal()),
"DCD", "CDC", "DCD",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
'C', new ItemStack(Items.dye, 1, 3)));
recipeBigCookie = Util.GetRecipes.lastIRecipe();
}
//Sub Sandwich
if(ConfigCrafting.SUB.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()),
"KCP", "FB ", "PCP",
'P', new ItemStack(Items.paper),
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
'F', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD),
'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()),
'K', knifeStack));
recipeSubSandwich = Util.GetRecipes.lastIRecipe();
}
//French Fry
if(ConfigCrafting.FRENCH_FRY.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()),
new ItemStack(Items.baked_potato),
knifeStack));
recipeFrenchFry = Util.GetRecipes.lastIRecipe();
}
//French Fries
if(ConfigCrafting.FRENCH_FRIES.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRIES.ordinal()),
"FFF", " P ",
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal())));
recipeFrenchFries = Util.GetRecipes.lastIRecipe();
}
//Fish N Chips
if(ConfigCrafting.FISH_N_CHIPS.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()),
"FIF", " P ",
'I', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD),
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal())));
recipeFishNChips = Util.GetRecipes.lastIRecipe();
}
//Cheese
if(ConfigCrafting.CHEESE.isEnabled()){
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
new ItemStack(Items.milk_bucket));
recipeCheese = Util.GetRecipes.lastIRecipe();
}
//Pumpkin Stew
if(ConfigCrafting.PUMPKIN_STEW.isEnabled()){
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PUMPKIN_STEW.ordinal()),
"P", "B",
'P', new ItemStack(Blocks.pumpkin),
'B', new ItemStack(Items.bowl));
recipePumpkinStew = Util.GetRecipes.lastIRecipe();
}
//Carrot Juice
if(ConfigCrafting.CARROT_JUICE.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()),
new ItemStack(Items.glass_bottle), "cropCarrot", knifeStack));
recipeCarrotJuice = Util.GetRecipes.lastIRecipe();
}
//Spaghetti
if(ConfigCrafting.SPAGHETTI.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SPAGHETTI.ordinal()),
"NNN", " B ",
'N', new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
'B', new ItemStack(Items.bowl)));
recipeSpaghetti = Util.GetRecipes.lastIRecipe();
}
//Noodle
if(ConfigCrafting.NOODLE.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
"cropWheat", knifeStack));
recipeNoodle = Util.GetRecipes.lastIRecipe();
}
//Chocolate
if(ConfigCrafting.CHOCOLATE.isEnabled()){
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.CHOCOLATE.ordinal()),
"C C", "CMC", "C C",
'C', new ItemStack(Items.dye, 1, 3),
'M', new ItemStack(Items.milk_bucket));
recipeChocolate = Util.GetRecipes.lastIRecipe();
}
//Chocolate Cake
if(ConfigCrafting.CHOCOLATE_CAKE.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_CAKE.ordinal()),
"MMM", "CCC", "EDS",
'M', new ItemStack(Items.milk_bucket),
'E', new ItemStack(Items.egg),
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
'S', new ItemStack(Items.sugar),
'C', new ItemStack(Items.dye, 1, 3)));
recipeChocolateCake = Util.GetRecipes.lastIRecipe();
}
//Toast
if(ConfigCrafting.TOAST.isEnabled()){
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.TOAST.ordinal()),
new ItemStack(Items.bread));
recipeToast = Util.GetRecipes.lastIRecipe();
}
2015-10-24 21:13:06 +02:00
2015-10-24 21:20:27 +02:00
//Chocolate Toast
if(ConfigCrafting.CHOCOLATE_TOAST.isEnabled()){
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE.ordinal()));
recipeChocolateToast = Util.GetRecipes.lastIRecipe();
2015-10-24 21:13:06 +02:00
}
}
}