TechReborn/src/main/java/techreborn/init/ModRecipes.java

95 lines
3.1 KiB
Java
Raw Normal View History

package techreborn.init;
2015-04-12 17:43:51 +02:00
import cpw.mods.fml.common.registry.GameRegistry;
import ic2.api.item.IC2Items;
import ic2.core.Ic2Items;
import net.minecraft.init.Items;
2015-04-12 17:43:51 +02:00
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import techreborn.api.CentrifugeRecipie;
import techreborn.api.TechRebornAPI;
2015-04-12 17:43:51 +02:00
import techreborn.util.CraftingHelper;
2015-04-12 00:13:38 +02:00
import techreborn.util.LogHelper;
2015-04-12 19:09:49 +02:00
import techreborn.util.RecipeRemover;
public class ModRecipes {
2015-04-12 17:43:51 +02:00
public static Item dustIron;
public static void init()
{
removeIc2Recipes();
addShaplessRecipes();
addShappedRecipes();
addSmeltingRecipes();
addMachineRecipes();
}
public static void removeIc2Recipes()
{
2015-04-12 19:09:49 +02:00
RecipeRemover.removeAnyRecipe(IC2Items.getItem("macerator"));
RecipeRemover.removeAnyRecipe(IC2Items.getItem("miningDrill"));
RecipeRemover.removeAnyRecipe(IC2Items.getItem("diamondDrill"));
2015-04-12 00:13:38 +02:00
LogHelper.info("IC2 Recipes Removed");
}
public static void addShappedRecipes()
{
2015-04-12 17:43:51 +02:00
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.thermalGenerator),
new Object[]{"III", "IHI", "CGC",
'I', "ingotInvar",
'H', IC2Items.getItem("reinforcedGlass"),
'C', IC2Items.getItem("electronicCircuit"),
'G', IC2Items.getItem("geothermalGenerator")});
2015-04-12 19:09:49 +02:00
CraftingHelper.addShapedOreRecipe(IC2Items.getItem("macerator"),
new Object[]{"FDF", "DMD", "FCF",
'F', Items.flint,
'D', Items.diamond,
'M', IC2Items.getItem("machine"),
'C', IC2Items.getItem("electronicCircuit")});
CraftingHelper.addShapedOreRecipe(IC2Items.getItem("miningDrill"),
new Object[]{" S ", "SCS", "SBS",
'S', "ingotSteel",
'B', IC2Items.getItem("reBattery"),
'C', IC2Items.getItem("electronicCircuit")});
CraftingHelper.addShapedOreRecipe(IC2Items.getItem("diamondDrill"),
new Object[]{" D ", "DBD", "TCT",
'D', "gemDiamond",
'T', "ingotTitanium",
'B', IC2Items.getItem("miningDrill"),
'C', IC2Items.getItem("advancedCircuit")});
2015-04-12 17:43:51 +02:00
2015-04-12 00:13:38 +02:00
LogHelper.info("Shapped Recipes Added");
}
public static void addShaplessRecipes()
{
2015-04-12 00:13:38 +02:00
LogHelper.info("Shapless Recipes Added");
}
public static void addSmeltingRecipes()
{
2015-04-12 17:43:51 +02:00
GameRegistry.addSmelting(new ItemStack(ModItems.dusts,1 ,27), new ItemStack(Items.iron_ingot), 1F);
GameRegistry.addSmelting(new ItemStack(ModItems.dusts,1 ,23), new ItemStack(Items.gold_ingot), 1F);
GameRegistry.addSmelting(new ItemStack(ModItems.dusts,1 ,14), IC2Items.getItem("copperIngot"), 1F);
GameRegistry.addSmelting(new ItemStack(ModItems.dusts,1 ,51), IC2Items.getItem("tinIngot"), 1F);
GameRegistry.addSmelting(new ItemStack(ModItems.dusts,1 ,7), IC2Items.getItem("bronzeIngot"), 1F);
GameRegistry.addSmelting(new ItemStack(ModItems.dusts,1 ,29), IC2Items.getItem("leadIngot"), 1F);
GameRegistry.addSmelting(new ItemStack(ModItems.dusts,1 ,45), IC2Items.getItem("silverIngot"), 1F);
2015-04-12 00:13:38 +02:00
LogHelper.info("Smelting Recipes Added");
}
public static void addMachineRecipes()
{
TechRebornAPI.registerCentrifugeRecipe(new CentrifugeRecipie(Items.apple, 4, Items.beef, Items.baked_potato, null, null, 120));
2015-04-12 00:13:38 +02:00
LogHelper.info("Machine Recipes Added");
}
}