From f4a3e87ebb6f0d2e04e7f95725daeccc6f71cfbc Mon Sep 17 00:00:00 2001 From: Modmuss50 Date: Wed, 11 Nov 2015 15:54:19 +0000 Subject: [PATCH] Fixes #233 --- .../java/techreborn/api/RollingMachineRecipe.java | 13 +++++++++++++ src/main/java/techreborn/api/TechRebornAPI.java | 10 ++++++++++ src/main/java/techreborn/init/ModRecipes.java | 6 +++--- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/main/java/techreborn/api/RollingMachineRecipe.java b/src/main/java/techreborn/api/RollingMachineRecipe.java index ae481326c..4ca34459b 100644 --- a/src/main/java/techreborn/api/RollingMachineRecipe.java +++ b/src/main/java/techreborn/api/RollingMachineRecipe.java @@ -8,6 +8,8 @@ import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.ShapedRecipes; import net.minecraft.item.crafting.ShapelessRecipes; import net.minecraft.world.World; +import net.minecraftforge.oredict.ShapedOreRecipe; +import net.minecraftforge.oredict.ShapelessOreRecipe; import java.util.ArrayList; import java.util.HashMap; @@ -19,6 +21,17 @@ public class RollingMachineRecipe { public static final RollingMachineRecipe instance = new RollingMachineRecipe(); + public void addShapedOreRecipe(ItemStack outputItemStack, + Object... objectInputs) { + recipes.add(new ShapedOreRecipe(outputItemStack, objectInputs)); + } + + public void addShapelessOreRecipe(ItemStack outputItemStack, + Object... objectInputs) { + recipes + .add(new ShapelessOreRecipe(outputItemStack, objectInputs)); + } + public void addRecipe(ItemStack output, Object... components) { String s = ""; int i = 0; diff --git a/src/main/java/techreborn/api/TechRebornAPI.java b/src/main/java/techreborn/api/TechRebornAPI.java index 500a70a4d..d4353815b 100644 --- a/src/main/java/techreborn/api/TechRebornAPI.java +++ b/src/main/java/techreborn/api/TechRebornAPI.java @@ -4,6 +4,16 @@ import net.minecraft.item.ItemStack; public final class TechRebornAPI { + public static void addRollingOreMachinceRecipe(ItemStack output, + Object... components) { + RollingMachineRecipe.instance.addShapedOreRecipe(output, components); + } + + public static void addShapelessOreRollingMachinceRecipe(ItemStack output, + Object... components) { + RollingMachineRecipe.instance.addShapelessOreRecipe(output, components); + } + public static void addRollingMachinceRecipe(ItemStack output, Object... components) { RollingMachineRecipe.instance.addRecipe(output, components); diff --git a/src/main/java/techreborn/init/ModRecipes.java b/src/main/java/techreborn/init/ModRecipes.java index caf64a22e..5ec32049d 100644 --- a/src/main/java/techreborn/init/ModRecipes.java +++ b/src/main/java/techreborn/init/ModRecipes.java @@ -318,10 +318,10 @@ public class 'L', "blockLapis", 'C', "circuitBasic"); - TechRebornAPI.addRollingMachinceRecipe(ItemParts.getPartByName("cupronickelHeatingCoil"), + TechRebornAPI.addRollingOreMachinceRecipe(ItemParts.getPartByName("cupronickelHeatingCoil"), "NCN", "C C", "NCN", - 'N', ItemIngots.getIngotByName("cupronickel"), - 'C', ItemIngots.getIngotByName("copper")); + 'N', "ingotCupronickel", + 'C', "ingotCopper"); }