package me.vudu.Conflict.Handlers;
import me.vudu.Conflict.ConflictPlugin;
import org.bukkit.inventory.ItemStack;
import org.getspout.spoutapi.SpoutManager;
import org.getspout.spoutapi.inventory.SpoutItemStack;
import org.getspout.spoutapi.inventory.SpoutShapedRecipe;
import org.getspout.spoutapi.material.MaterialData;
/**
* verwaltet eigene Rezepte
* @author vwendel
*
*/
public class RecipeManager {
/**
* generiert alle eigenen Rezepte
*/
public static void addRecipes(){
//Artefakt Stufe 1
ItemStack result_1_1 = new SpoutItemStack(ConflictPlugin.art_1_1, 1);
SpoutShapedRecipe recipe_1_1 = new SpoutShapedRecipe(result_1_1);
recipe_1_1.shape("TFT", "RSB", "III");
recipe_1_1.setIngredient('I', MaterialData.ironIngot);
recipe_1_1.setIngredient('R', MaterialData.rottenFlesh);
recipe_1_1.setIngredient('S', MaterialData.spiderEye);
recipe_1_1.setIngredient('B', MaterialData.bone);
recipe_1_1.setIngredient('F', MaterialData.rawFish);
recipe_1_1.setIngredient('T', MaterialData.inkSac);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_1_1);
//Artefakt Stufe 2
ItemStack result_2_1 = new SpoutItemStack(ConflictPlugin.art_2_1, 1);
SpoutShapedRecipe recipe_2_1 = new SpoutShapedRecipe(result_2_1);
recipe_2_1.shape(" ", "GTC", "A A");
recipe_2_1.setIngredient('C', MaterialData.cake);
recipe_2_1.setIngredient('T', MaterialData.tnt);
recipe_2_1.setIngredient('G', MaterialData.goldenApple);
recipe_2_1.setIngredient('A', ConflictPlugin.art_1_5);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_2_1);
//Artefakt Stufe 3
ItemStack result_3_1 = new SpoutItemStack(ConflictPlugin.art_3_1, 1);
SpoutShapedRecipe recipe_3_1 = new SpoutShapedRecipe(result_3_1);
recipe_3_1.shape("LGL", "ODO", "A A");
recipe_3_1.setIngredient('G', MaterialData.ghastTear);
recipe_3_1.setIngredient('L', MaterialData.lapisBlock);
recipe_3_1.setIngredient('D', MaterialData.diamondBlock);
recipe_3_1.setIngredient('O', MaterialData.goldBlock);
recipe_3_1.setIngredient('A', ConflictPlugin.art_2_5);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_3_1);
//VuduBrick
ItemStack result_VuduBrick = new SpoutItemStack(ConflictPlugin.vuduBrick, 4);
SpoutShapedRecipe recipe_VB = new SpoutShapedRecipe(result_VuduBrick);
recipe_VB.shape("S S", " I ", "S S");
recipe_VB.setIngredient('S', MaterialData.stone);
recipe_VB.setIngredient('I', MaterialData.brick);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_VB);
//DamageTowerBlock
ItemStack result_DamageTower = new SpoutItemStack(ConflictPlugin.damageTower, 1);
SpoutShapedRecipe recipe_DT = new SpoutShapedRecipe(result_DamageTower);
recipe_DT.shape("GGG", "DED", " A ");
recipe_DT.setIngredient('G', MaterialData.goldSword);
recipe_DT.setIngredient('D', MaterialData.dispenser);
recipe_DT.setIngredient('E', MaterialData.enderPearl);
recipe_DT.setIngredient('A', ConflictPlugin.art_1_5);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_DT);
//DefenseTowerBlock
ItemStack result_DefenseTower = new SpoutItemStack(ConflictPlugin.defenseTower, 1);
SpoutShapedRecipe recipe_DeT = new SpoutShapedRecipe(result_DefenseTower);
recipe_DeT.shape(" G ", "RER", " A ");
recipe_DeT.setIngredient('G', MaterialData.goldHelmet);
recipe_DeT.setIngredient('R', MaterialData.redstoneRepeater);
recipe_DeT.setIngredient('E', MaterialData.enderPearl);
recipe_DeT.setIngredient('A', ConflictPlugin.art_1_5);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_DeT);
//RadarTowerBlock
ItemStack result_RadarTower = new SpoutItemStack(ConflictPlugin.radarTower, 1);
SpoutShapedRecipe recipe_RT = new SpoutShapedRecipe(result_RadarTower);
recipe_RT.shape(" C ", " E ", " A ");
recipe_RT.setIngredient('C', MaterialData.compass);
recipe_RT.setIngredient('E', MaterialData.enderPearl);
recipe_RT.setIngredient('A', ConflictPlugin.art_1_5);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_RT);
//ChainMail
//Helm
ItemStack result_chainHelm = new SpoutItemStack(302);
SpoutShapedRecipe recipe_chainHelm = new SpoutShapedRecipe(result_chainHelm);
recipe_chainHelm.shape("RRR", "RLR", " ");
recipe_chainHelm.setIngredient('R', MaterialData.redstone);
recipe_chainHelm.setIngredient('L', MaterialData.lavaBucket);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_chainHelm);
//Plate
ItemStack result_chainPlate = new SpoutItemStack(303);
SpoutShapedRecipe recipe_chainPlate= new SpoutShapedRecipe(result_chainPlate);
recipe_chainPlate.shape("RLR", "RLR", "RRR");
recipe_chainPlate.setIngredient('R', MaterialData.redstone);
recipe_chainPlate.setIngredient('L', MaterialData.lavaBucket);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_chainPlate);
//Leggins
ItemStack result_chainLeggins = new SpoutItemStack(304);
SpoutShapedRecipe recipe_chainLeggins = new SpoutShapedRecipe(result_chainLeggins);
recipe_chainLeggins.shape("RRR", "RLR", "R R");
recipe_chainLeggins.setIngredient('R', MaterialData.redstone);
recipe_chainLeggins.setIngredient('L', MaterialData.lavaBucket);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_chainLeggins);
//Shoes
ItemStack result_chainShoes = new SpoutItemStack(305);
SpoutShapedRecipe recipe_chainShoes = new SpoutShapedRecipe(result_chainShoes);
recipe_chainShoes.shape(" ", "RLR", "R R");
recipe_chainShoes.setIngredient('R', MaterialData.redstone);
recipe_chainShoes.setIngredient('L', MaterialData.lavaBucket);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_chainShoes);
//Converter ERZ+Redstone -> Diamant
SpoutShapedRecipe recipe_diam1 = new SpoutShapedRecipe(new SpoutItemStack(MaterialData.diamond, 1));
recipe_diam1.shape(" I ", "RRR", "RRR");
recipe_diam1.setIngredient('R', MaterialData.redstone);
recipe_diam1.setIngredient('I', MaterialData.ironBlock);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_diam1);
SpoutShapedRecipe recipe_diam2 = new SpoutShapedRecipe(new SpoutItemStack(MaterialData.diamond, 1));
recipe_diam2.shape(" L ", "RRR", "RRR");
recipe_diam2.setIngredient('R', MaterialData.redstone);
recipe_diam2.setIngredient('L', MaterialData.lapisBlock);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_diam2);
SpoutShapedRecipe recipe_diam3 = new SpoutShapedRecipe(new SpoutItemStack(MaterialData.diamond, 1));
recipe_diam3.shape(" I ", " L ", " ");
recipe_diam3.setIngredient('I', MaterialData.ironBlock);
recipe_diam3.setIngredient('L', MaterialData.lapisBlock);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_diam3);
//Converter ERZ+Redstone -> Gold
SpoutShapedRecipe recipe_gold1 = new SpoutShapedRecipe(new SpoutItemStack(MaterialData.goldIngot, 1));
recipe_gold1.shape("III", "III", "RRR");
recipe_gold1.setIngredient('R', MaterialData.redstone);
recipe_gold1.setIngredient('I', MaterialData.ironIngot);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_gold1);
SpoutShapedRecipe recipe_gold2 = new SpoutShapedRecipe(new SpoutItemStack(MaterialData.goldIngot, 1));
recipe_gold2.shape("LLL", "LLL", "RRR");
recipe_gold2.setIngredient('R', MaterialData.redstone);
recipe_gold2.setIngredient('L', MaterialData.lapisLazuli);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_gold2);
SpoutShapedRecipe recipe_gold3 = new SpoutShapedRecipe(new SpoutItemStack(MaterialData.goldIngot, 1));
recipe_gold3.shape("III", "LIL", "LLL");
recipe_gold3.setIngredient('I', MaterialData.ironIngot);
recipe_gold3.setIngredient('L', MaterialData.lapisLazuli);
SpoutManager.getMaterialManager().registerSpoutRecipe(recipe_gold3);
}
}