Added craftingHelper and basic recipes
This commit is contained in:
parent
acb03ff4aa
commit
0a14a36ef4
2 changed files with 46 additions and 0 deletions
|
@ -1,12 +1,20 @@
|
|||
package techreborn.init;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import ic2.api.item.IC2Items;
|
||||
import ic2.core.Ic2Items;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import techreborn.api.CentrifugeRecipie;
|
||||
import techreborn.api.TechRebornAPI;
|
||||
import techreborn.util.CraftingHelper;
|
||||
import techreborn.util.LogHelper;
|
||||
|
||||
public class ModRecipes {
|
||||
|
||||
public static Item dustIron;
|
||||
|
||||
public static void init()
|
||||
{
|
||||
removeIc2Recipes();
|
||||
|
@ -23,6 +31,16 @@ public class ModRecipes {
|
|||
|
||||
public static void addShappedRecipes()
|
||||
{
|
||||
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")});
|
||||
|
||||
|
||||
|
||||
|
||||
LogHelper.info("Shapped Recipes Added");
|
||||
}
|
||||
|
||||
|
@ -33,6 +51,14 @@ public class ModRecipes {
|
|||
|
||||
public static void addSmeltingRecipes()
|
||||
{
|
||||
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);
|
||||
|
||||
LogHelper.info("Smelting Recipes Added");
|
||||
}
|
||||
|
||||
|
|
20
src/main/java/techreborn/util/CraftingHelper.java
Normal file
20
src/main/java/techreborn/util/CraftingHelper.java
Normal file
|
@ -0,0 +1,20 @@
|
|||
package techreborn.util;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
public class CraftingHelper {
|
||||
|
||||
public static void addShapedOreRecipe(ItemStack outputItemStack, Object... objectInputs)
|
||||
{
|
||||
CraftingManager.getInstance().getRecipeList() .add(new ShapedOreRecipe(outputItemStack, objectInputs));
|
||||
}
|
||||
|
||||
public static void addShapelessOreRecipe(ItemStack outputItemStack, Object... objectInputs)
|
||||
{
|
||||
CraftingManager.getInstance().getRecipeList() .add(new ShapelessOreRecipe(outputItemStack, objectInputs));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue