aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/recipes
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2022-01-30 09:57:25 +0100
committerGitHub <noreply@github.com>2022-01-30 09:57:25 +0100
commit69834eef41c6cb12d69b1963603f7426e0736682 (patch)
tree4b3e3887be059a2e3373a89e7aa8ffa996478a05 /src/main/java/gtPlusPlus/xmod/gregtech/recipes
parent8cc0619706f93b4e81fb930ec7fb85cdcbd5d734 (diff)
parent1d983706ef427b1d008787843ac23529e43cc659 (diff)
downloadGT5-Unofficial-69834eef41c6cb12d69b1963603f7426e0736682.tar.gz
GT5-Unofficial-69834eef41c6cb12d69b1963603f7426e0736682.tar.bz2
GT5-Unofficial-69834eef41c6cb12d69b1963603f7426e0736682.zip
Merge pull request #102 from GTNewHorizons/St00f
St00f
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/recipes')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java33
1 files changed, 25 insertions, 8 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index 2b8a110b09..79a9f788df 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -1578,15 +1578,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;
}
}