From c043d88a57a690b1f40cdcd997cdf00cfe06ad09 Mon Sep 17 00:00:00 2001 From: draknyte1 Date: Thu, 3 Nov 2016 00:16:36 +1000 Subject: + Added support for using items as input for the Matter fabricator. --- .../xmod/gregtech/recipes/GregtechRecipeAdder.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/recipes') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java index bf752c2c79..b9a8ac7a1e 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java @@ -106,6 +106,24 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } } + @Override + public boolean addMatterFabricatorRecipe(ItemStack aInputStack, FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration, int aEUt) { + try { + try {if (aFluidOutput == null || aInputStack == null) {return false;}} catch (NullPointerException e){} + try{ + if (aFluidInput == null){ + Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.addRecipe(true, new ItemStack[]{aInputStack}, null, null, null, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0); + } + else { + Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.addRecipe(true, new ItemStack[]{aInputStack}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0); + } + RECIPEHANDLER_MatterFabricator.debug5(aFluidInput, aFluidOutput, aDuration, aEUt); + return true; + } catch (NullPointerException e){return false;} + } catch (Throwable e){return false;} + } + + @Override public boolean addFuel(ItemStack aInput1, ItemStack aOutput1, int aEU, int aType) { if (aInput1 == null) { -- cgit