From 3d46d957637c60aeecb59065da2328401f27949d Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 23 Jan 2022 20:07:04 +0000 Subject: Added some bees and shit. Added Force. Updated how GT++ material components get localized. --- .../xmod/gregtech/recipes/GregtechRecipeAdder.java | 33 ++++++++++++++++------ 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/recipes') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java index 2b324fc172..d727da4211 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java @@ -1550,15 +1550,32 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { @Override public boolean addExtractorRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt) { + return addExtractorRecipe(aInput, aOutput, 10000, aDuration, aEUt); + } + + @Override + public boolean addExtractorRecipe(ItemStack aInput, ItemStack aOutput, int aChance, int aDuration, int aEUt) { if (aInput != null && aOutput != null) { - if ((aDuration = GregTech_API.sRecipeFile.get("extractor", aInput, aDuration)) <= 0) { - return false; - } else { - GT_Recipe_Map.sExtractorRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, - (Object) null, (FluidStack[]) null, (FluidStack[]) null, aDuration, aEUt, 0); - return true; - } - } else { + GT_Recipe aRecipe = new GTPP_Recipe( + false, + new ItemStack[] { + aInput.copy() + }, + new ItemStack[] { + aOutput.copy() + }, + null, + new int[] {aChance}, + null, + null, + aDuration, + aEUt, + 0); + int aSize = GT_Recipe_Map.sExtractorRecipes.mRecipeList.size(); + GT_Recipe_Map.sExtractorRecipes.add(aRecipe); + return GT_Recipe_Map.sExtractorRecipes.mRecipeList.size() > aSize; + } + else { return false; } } -- cgit