2015-01-30 20:16:32 +01:00
|
|
|
package ellpeck.someprettyrandomstuff.crafting;
|
|
|
|
|
2015-02-17 16:15:16 +01:00
|
|
|
import cpw.mods.fml.common.registry.GameRegistry;
|
2015-02-09 17:25:05 +01:00
|
|
|
import ellpeck.someprettyrandomstuff.blocks.InitBlocks;
|
|
|
|
import ellpeck.someprettyrandomstuff.config.ConfigValues;
|
2015-01-30 20:16:32 +01:00
|
|
|
import ellpeck.someprettyrandomstuff.items.InitItems;
|
|
|
|
import ellpeck.someprettyrandomstuff.items.metalists.TheFoods;
|
|
|
|
import ellpeck.someprettyrandomstuff.items.metalists.TheMiscItems;
|
2015-02-09 17:25:05 +01:00
|
|
|
import ellpeck.someprettyrandomstuff.util.Util;
|
2015-01-30 20:16:32 +01:00
|
|
|
import net.minecraft.init.Blocks;
|
|
|
|
import net.minecraft.init.Items;
|
2015-02-09 17:25:05 +01:00
|
|
|
import net.minecraft.item.Item;
|
|
|
|
import net.minecraft.item.ItemFood;
|
2015-01-30 20:16:32 +01:00
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
|
|
|
public class InitCrafting {
|
|
|
|
|
|
|
|
public static void init(){
|
2015-02-09 17:25:05 +01:00
|
|
|
Util.logInfo("Initializing Crafting Recipes...");
|
2015-01-30 20:16:32 +01:00
|
|
|
|
2015-02-17 16:15:16 +01:00
|
|
|
//Baguette
|
2015-02-09 17:25:05 +01:00
|
|
|
if(ConfigValues.enabledFoodRecipes[TheFoods.BAGUETTE.ordinal()])
|
|
|
|
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1,
|
|
|
|
TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 1F);
|
2015-01-30 20:16:32 +01:00
|
|
|
|
2015-02-17 16:15:16 +01:00
|
|
|
//Dough
|
2015-02-09 17:25:05 +01:00
|
|
|
if(ConfigValues.enabledMiscRecipes[TheMiscItems.DOUGH.ordinal()])
|
|
|
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()),
|
|
|
|
new ItemStack(Items.wheat), new ItemStack(Items.wheat));
|
2015-01-30 20:16:32 +01:00
|
|
|
|
2015-02-17 16:15:16 +01:00
|
|
|
//Pizza
|
2015-02-09 17:25:05 +01:00
|
|
|
if(ConfigValues.enabledFoodRecipes[TheFoods.PIZZA.ordinal()])
|
2015-01-30 20:16:32 +01:00
|
|
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PIZZA.ordinal()),
|
2015-02-17 16:15:16 +01:00
|
|
|
"HKH", "MCF", " D ",
|
2015-01-30 20:16:32 +01:00
|
|
|
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
|
|
|
|
'M', new ItemStack(Blocks.brown_mushroom),
|
|
|
|
'C', new ItemStack(Items.carrot),
|
2015-02-09 17:25:05 +01:00
|
|
|
'F', new ItemStack(Items.fish, 1, Util.WILDCARD),
|
2015-02-17 16:15:16 +01:00
|
|
|
'K', new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD),
|
2015-01-30 20:16:32 +01:00
|
|
|
'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()));
|
|
|
|
|
2015-02-17 16:15:16 +01:00
|
|
|
//Hamburger
|
2015-02-09 17:25:05 +01:00
|
|
|
if(ConfigValues.enabledFoodRecipes[TheFoods.HAMBURGER.ordinal()])
|
2015-01-30 20:16:32 +01:00
|
|
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()),
|
2015-02-17 16:15:16 +01:00
|
|
|
"KT ", "CBS", " T ",
|
2015-01-30 20:16:32 +01:00
|
|
|
'T', new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()),
|
|
|
|
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
|
2015-02-09 17:25:05 +01:00
|
|
|
'S', new ItemStack(Blocks.leaves, 1, Util.WILDCARD),
|
2015-02-17 16:15:16 +01:00
|
|
|
'K', new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD),
|
2015-01-30 20:16:32 +01:00
|
|
|
'B', new ItemStack(Items.cooked_beef));
|
|
|
|
|
2015-02-17 16:15:16 +01:00
|
|
|
//Big Cookie
|
2015-02-09 17:25:05 +01:00
|
|
|
if(ConfigValues.enabledFoodRecipes[TheFoods.BIG_COOKIE.ordinal()])
|
2015-01-30 20:16:32 +01:00
|
|
|
GameRegistry.addRecipe(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));
|
|
|
|
|
2015-02-17 16:15:16 +01:00
|
|
|
//Sub Sandwich
|
2015-02-09 17:25:05 +01:00
|
|
|
if(ConfigValues.enabledFoodRecipes[TheFoods.SUBMARINE_SANDWICH.ordinal()])
|
2015-01-30 20:16:32 +01:00
|
|
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()),
|
2015-02-17 16:15:16 +01:00
|
|
|
"KCP", "FBS", "PCP",
|
2015-01-30 20:16:32 +01:00
|
|
|
'P', new ItemStack(Items.paper),
|
|
|
|
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
|
2015-02-09 17:25:05 +01:00
|
|
|
'F', new ItemStack(Items.fish, 1, Util.WILDCARD),
|
2015-01-30 20:16:32 +01:00
|
|
|
'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()),
|
2015-02-17 16:15:16 +01:00
|
|
|
'K', new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD),
|
2015-02-09 17:25:05 +01:00
|
|
|
'S', new ItemStack(Blocks.leaves, 1, Util.WILDCARD));
|
2015-01-30 20:16:32 +01:00
|
|
|
|
2015-02-17 16:15:16 +01:00
|
|
|
//Paper Cone
|
2015-02-09 17:25:05 +01:00
|
|
|
if(ConfigValues.enabledMiscRecipes[TheMiscItems.PAPER_CONE.ordinal()])
|
|
|
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
|
|
|
|
"P P", " P ",
|
|
|
|
'P', new ItemStack(Items.paper));
|
|
|
|
|
2015-02-17 16:15:16 +01:00
|
|
|
//French Fry
|
2015-02-09 17:25:05 +01:00
|
|
|
if(ConfigValues.enabledFoodRecipes[TheFoods.FRENCH_FRY.ordinal()])
|
|
|
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()),
|
|
|
|
new ItemStack(Items.baked_potato),
|
2015-02-17 16:15:16 +01:00
|
|
|
new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD));
|
|
|
|
|
|
|
|
//Knife Handle
|
|
|
|
if(ConfigValues.enabledMiscRecipes[TheMiscItems.KNIFE_HANDLE.ordinal()])
|
|
|
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()),
|
|
|
|
new ItemStack(Items.stick),
|
|
|
|
new ItemStack(Items.slime_ball));
|
|
|
|
|
|
|
|
//Knife Blade
|
|
|
|
if(ConfigValues.enabledMiscRecipes[TheMiscItems.KNIFE_BLADE.ordinal()])
|
|
|
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()),
|
|
|
|
new ItemStack(Items.iron_ingot),
|
|
|
|
new ItemStack(Items.slime_ball));
|
|
|
|
|
|
|
|
//Knife
|
|
|
|
if(ConfigValues.enableKnifeRecipe)
|
|
|
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemKnife),
|
|
|
|
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()),
|
|
|
|
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()));
|
|
|
|
|
|
|
|
//French Fries
|
2015-02-09 17:25:05 +01:00
|
|
|
if(ConfigValues.enabledFoodRecipes[TheFoods.FRENCH_FRIES.ordinal()])
|
|
|
|
GameRegistry.addRecipe(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()));
|
|
|
|
|
2015-02-17 16:15:16 +01:00
|
|
|
//Fish N Chips
|
2015-02-09 17:25:05 +01:00
|
|
|
if(ConfigValues.enabledFoodRecipes[TheFoods.FISH_N_CHIPS.ordinal()])
|
|
|
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()),
|
|
|
|
"FIF", " P ",
|
2015-02-17 16:15:16 +01:00
|
|
|
'I', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD),
|
2015-02-09 17:25:05 +01:00
|
|
|
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
|
|
|
|
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()));
|
|
|
|
|
2015-02-17 16:15:16 +01:00
|
|
|
//Compost
|
2015-02-09 17:25:05 +01:00
|
|
|
if(ConfigValues.enableCompostRecipe)
|
|
|
|
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockCompost),
|
|
|
|
"W W", "WFW", "WWW",
|
|
|
|
'W', new ItemStack(Blocks.planks, 1, Util.WILDCARD),
|
|
|
|
'F', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.MASHED_FOOD.ordinal()));
|
|
|
|
|
2015-02-17 16:15:16 +01:00
|
|
|
//Cheese
|
|
|
|
if(ConfigValues.enabledFoodRecipes[TheFoods.CHEESE.ordinal()])
|
|
|
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
|
|
|
|
new ItemStack(Items.milk_bucket));
|
|
|
|
|
|
|
|
//Pumpkin Stew
|
|
|
|
if(ConfigValues.enabledFoodRecipes[TheFoods.PUMPKIN_STEW.ordinal()])
|
|
|
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PUMPKIN_STEW.ordinal()),
|
|
|
|
"P", "B",
|
|
|
|
'P', new ItemStack(Blocks.pumpkin),
|
|
|
|
'B', new ItemStack(Items.bowl));
|
|
|
|
|
|
|
|
//Carrot Juice
|
|
|
|
if(ConfigValues.enabledFoodRecipes[TheFoods.CARROT_JUICE.ordinal()])
|
|
|
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()),
|
|
|
|
new ItemStack(Items.glass_bottle), new ItemStack(Items.carrot), new ItemStack(InitItems.itemKnife));
|
|
|
|
|
|
|
|
//Spaghetti
|
|
|
|
if(ConfigValues.enabledFoodRecipes[TheFoods.SPAGHETTI.ordinal()])
|
|
|
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SPAGHETTI.ordinal()),
|
|
|
|
"NNN", "B",
|
|
|
|
'N', new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
|
|
|
|
'B', new ItemStack(Items.bowl));
|
|
|
|
|
|
|
|
//Noodle
|
|
|
|
if(ConfigValues.enabledFoodRecipes[TheFoods.NOODLE.ordinal()])
|
|
|
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
|
|
|
|
new ItemStack(Items.wheat), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemKnife));
|
|
|
|
|
|
|
|
//Mashed Food
|
2015-02-09 17:25:05 +01:00
|
|
|
if(ConfigValues.enabledMiscRecipes[TheMiscItems.MASHED_FOOD.ordinal()])
|
|
|
|
initMashedFoodRecipes();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void initMashedFoodRecipes(){
|
|
|
|
|
|
|
|
for(Object nextIterator : Item.itemRegistry){
|
|
|
|
if(nextIterator instanceof ItemFood){
|
|
|
|
ItemStack ingredient = new ItemStack((Item)nextIterator, 1, Util.WILDCARD);
|
2015-02-17 16:15:16 +01:00
|
|
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.MASHED_FOOD.ordinal()), ingredient, ingredient, ingredient, ingredient, new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD));
|
2015-02-09 17:25:05 +01:00
|
|
|
}
|
|
|
|
}
|
2015-01-30 20:16:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|