2015-08-29 14:33:25 +02:00
|
|
|
/*
|
2016-05-16 22:52:27 +02:00
|
|
|
* This file ("FoodCrafting.java") is part of the Actually Additions mod for Minecraft.
|
2015-08-29 14:33:25 +02:00
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
2016-05-16 22:52:27 +02:00
|
|
|
* http://ellpeck.de/actaddlicense
|
2015-08-29 14:33:25 +02:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2016-05-16 22:54:42 +02:00
|
|
|
* © 2015-2016 Ellpeck
|
2015-08-29 14:33:25 +02:00
|
|
|
*/
|
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
package de.ellpeck.actuallyadditions.mod.crafting;
|
2015-03-07 02:23:31 +01:00
|
|
|
|
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;
|
2016-03-18 18:41:37 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
|
2016-01-05 04:47:35 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.Util;
|
2015-03-07 02:23:31 +01:00
|
|
|
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;
|
2015-04-04 05:20:19 +02:00
|
|
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
|
|
|
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
2015-03-07 02:23:31 +01:00
|
|
|
|
2016-06-17 23:50:38 +02:00
|
|
|
public final class FoodCrafting{
|
2015-03-07 02:23:31 +01:00
|
|
|
|
2015-08-28 21:17:09 +02:00
|
|
|
public static IRecipe recipePizza;
|
2015-08-28 22:18:46 +02:00
|
|
|
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;
|
2016-01-04 17:34:06 +01:00
|
|
|
public static IRecipe recipeBacon;
|
2015-08-28 21:17:09 +02:00
|
|
|
|
2015-03-07 02:23:31 +01:00
|
|
|
public static void init(){
|
|
|
|
|
2015-08-07 00:04:58 +02:00
|
|
|
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
|
2015-08-28 22:18:46 +02:00
|
|
|
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-08-28 22:18:46 +02:00
|
|
|
}
|
2015-05-20 22:39:43 +02:00
|
|
|
|
2016-01-04 17:34:06 +01:00
|
|
|
//Bacon
|
|
|
|
if(ConfigCrafting.BACON.isEnabled()){
|
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.BACON.ordinal()),
|
2016-04-20 21:39:03 +02:00
|
|
|
knifeStack.copy(), new ItemStack(Items.COOKED_PORKCHOP)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeBacon = RecipeUtil.lastIRecipe();
|
2016-01-04 17:34:06 +01:00
|
|
|
}
|
|
|
|
|
2015-03-07 02:23:31 +01:00
|
|
|
//Baguette
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.BAGUETTE.isEnabled()){
|
2015-03-07 02:23:31 +01:00
|
|
|
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1,
|
|
|
|
TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 1F);
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//Pizza
|
2015-08-28 21:17:09 +02:00
|
|
|
if(ConfigCrafting.PIZZA.isEnabled()){
|
2015-04-04 05:20:19 +02:00
|
|
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PIZZA.ordinal()),
|
2015-03-07 02:23:31 +01:00
|
|
|
"HKH", "MCF", " D ",
|
2015-07-02 10:45:15 +02:00
|
|
|
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
|
2016-04-20 21:39:03 +02:00
|
|
|
'M', new ItemStack(Blocks.BROWN_MUSHROOM),
|
2015-04-04 05:20:19 +02:00
|
|
|
'C', "cropCarrot",
|
2016-04-20 21:39:03 +02:00
|
|
|
'F', new ItemStack(Items.COOKED_FISH, 1, Util.WILDCARD),
|
2016-01-08 18:09:11 +01:00
|
|
|
'K', knifeStack.copy(),
|
2015-07-02 10:45:15 +02:00
|
|
|
'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal())));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipePizza = RecipeUtil.lastIRecipe();
|
2015-08-28 21:17:09 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//Hamburger
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.HAMBURGER.isEnabled()){
|
2015-04-04 05:20:19 +02:00
|
|
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()),
|
2015-03-07 02:23:31 +01:00
|
|
|
"KT ", "CB ", " T ",
|
2015-07-02 10:45:15 +02:00
|
|
|
'T', new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()),
|
|
|
|
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
|
2016-01-08 18:09:11 +01:00
|
|
|
'K', knifeStack.copy(),
|
2016-04-20 21:39:03 +02:00
|
|
|
'B', new ItemStack(Items.COOKED_BEEF)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeHamburger = RecipeUtil.lastIRecipe();
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//Big Cookie
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.BIG_COOKIE.isEnabled()){
|
2015-04-04 05:20:19 +02:00
|
|
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.BIG_COOKIE.ordinal()),
|
2015-03-07 02:23:31 +01:00
|
|
|
"DCD", "CDC", "DCD",
|
2015-07-02 10:45:15 +02:00
|
|
|
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
|
2016-04-20 21:39:03 +02:00
|
|
|
'C', new ItemStack(Items.DYE, 1, 3)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeBigCookie = RecipeUtil.lastIRecipe();
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//Sub Sandwich
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.SUB.isEnabled()){
|
2015-04-04 05:20:19 +02:00
|
|
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()),
|
2015-03-07 02:23:31 +01:00
|
|
|
"KCP", "FB ", "PCP",
|
2016-04-20 21:39:03 +02:00
|
|
|
'P', new ItemStack(Items.PAPER),
|
2015-07-02 10:45:15 +02:00
|
|
|
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
|
2016-04-20 21:39:03 +02:00
|
|
|
'F', new ItemStack(Items.COOKED_BEEF, 1, Util.WILDCARD),
|
2015-07-02 10:45:15 +02:00
|
|
|
'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()),
|
2016-01-08 18:09:11 +01:00
|
|
|
'K', knifeStack.copy()));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeSubSandwich = RecipeUtil.lastIRecipe();
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//French Fry
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.FRENCH_FRY.isEnabled()){
|
2015-04-04 05:20:19 +02:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()),
|
2016-04-20 21:39:03 +02:00
|
|
|
new ItemStack(Items.BAKED_POTATO),
|
2016-01-08 18:09:11 +01:00
|
|
|
knifeStack.copy()));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeFrenchFry = RecipeUtil.lastIRecipe();
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//French Fries
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.FRENCH_FRIES.isEnabled()){
|
2015-04-04 05:20:19 +02:00
|
|
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRIES.ordinal()),
|
2015-03-07 02:23:31 +01:00
|
|
|
"FFF", " P ",
|
2015-07-02 10:45:15 +02:00
|
|
|
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
|
|
|
|
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal())));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeFrenchFries = RecipeUtil.lastIRecipe();
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//Fish N Chips
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.FISH_N_CHIPS.isEnabled()){
|
2015-04-04 05:20:19 +02:00
|
|
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()),
|
2015-03-07 02:23:31 +01:00
|
|
|
"FIF", " P ",
|
2016-04-20 21:39:03 +02:00
|
|
|
'I', new ItemStack(Items.COOKED_FISH, 1, Util.WILDCARD),
|
2015-07-02 10:45:15 +02:00
|
|
|
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
|
|
|
|
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal())));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeFishNChips = RecipeUtil.lastIRecipe();
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//Cheese
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.CHEESE.isEnabled()){
|
2015-03-07 02:23:31 +01:00
|
|
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
|
2016-04-20 21:39:03 +02:00
|
|
|
new ItemStack(Items.MILK_BUCKET));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeCheese = RecipeUtil.lastIRecipe();
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//Pumpkin Stew
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.PUMPKIN_STEW.isEnabled()){
|
2015-03-07 02:23:31 +01:00
|
|
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PUMPKIN_STEW.ordinal()),
|
|
|
|
"P", "B",
|
2016-04-20 21:39:03 +02:00
|
|
|
'P', new ItemStack(Blocks.PUMPKIN),
|
|
|
|
'B', new ItemStack(Items.BOWL));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipePumpkinStew = RecipeUtil.lastIRecipe();
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//Carrot Juice
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.CARROT_JUICE.isEnabled()){
|
2015-04-04 05:20:19 +02:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()),
|
2016-04-20 21:39:03 +02:00
|
|
|
new ItemStack(Items.GLASS_BOTTLE), "cropCarrot", knifeStack.copy()));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeCarrotJuice = RecipeUtil.lastIRecipe();
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//Spaghetti
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.SPAGHETTI.isEnabled()){
|
2015-04-04 05:20:19 +02:00
|
|
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SPAGHETTI.ordinal()),
|
2015-03-07 02:23:31 +01:00
|
|
|
"NNN", " B ",
|
2015-07-02 10:45:15 +02:00
|
|
|
'N', new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
|
2016-04-20 21:39:03 +02:00
|
|
|
'B', new ItemStack(Items.BOWL)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeSpaghetti = RecipeUtil.lastIRecipe();
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//Noodle
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.NOODLE.isEnabled()){
|
2015-04-04 05:20:19 +02:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
|
2016-01-08 18:09:11 +01:00
|
|
|
"cropWheat", knifeStack.copy()));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeNoodle = RecipeUtil.lastIRecipe();
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//Chocolate
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.CHOCOLATE.isEnabled()){
|
2015-05-29 18:17:28 +02:00
|
|
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.CHOCOLATE.ordinal()),
|
2015-03-07 02:23:31 +01:00
|
|
|
"C C", "CMC", "C C",
|
2016-04-20 21:39:03 +02:00
|
|
|
'C', new ItemStack(Items.DYE, 1, 3),
|
|
|
|
'M', new ItemStack(Items.MILK_BUCKET));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeChocolate = RecipeUtil.lastIRecipe();
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//Chocolate Cake
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.CHOCOLATE_CAKE.isEnabled()){
|
2015-04-04 05:20:19 +02:00
|
|
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_CAKE.ordinal()),
|
2015-03-07 02:23:31 +01:00
|
|
|
"MMM", "CCC", "EDS",
|
2016-04-20 21:39:03 +02:00
|
|
|
'M', new ItemStack(Items.MILK_BUCKET),
|
|
|
|
'E', new ItemStack(Items.EGG),
|
2015-07-02 10:45:15 +02:00
|
|
|
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
|
2016-04-20 21:39:03 +02:00
|
|
|
'S', new ItemStack(Items.SUGAR),
|
|
|
|
'C', new ItemStack(Items.DYE, 1, 3)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeChocolateCake = RecipeUtil.lastIRecipe();
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
|
|
|
//Toast
|
2015-08-28 22:18:46 +02:00
|
|
|
if(ConfigCrafting.TOAST.isEnabled()){
|
2015-03-07 02:23:31 +01:00
|
|
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.TOAST.ordinal()),
|
2016-04-20 21:39:03 +02:00
|
|
|
new ItemStack(Items.BREAD));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeToast = RecipeUtil.lastIRecipe();
|
2015-08-28 22:18:46 +02:00
|
|
|
}
|
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()));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipeChocolateToast = RecipeUtil.lastIRecipe();
|
2015-10-24 21:13:06 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|