diff options
author | Sampsa <69092953+S4mpsa@users.noreply.github.com> | 2022-10-07 22:32:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-07 21:32:12 +0200 |
commit | 008e3c6c38ac29c4ed1f9c57714b3da584e474f3 (patch) | |
tree | fafc40252d68f05636d83a0ea12beaeed034d3d1 /src/main/java/gregtech/api | |
parent | 85962632c23ee1c4418ddd8face2a1a1e4c3f1e8 (diff) | |
download | GT5-Unofficial-008e3c6c38ac29c4ed1f9c57714b3da584e474f3.tar.gz GT5-Unofficial-008e3c6c38ac29c4ed1f9c57714b3da584e474f3.tar.bz2 GT5-Unofficial-008e3c6c38ac29c4ed1f9c57714b3da584e474f3.zip |
Added batch mode to Processing Arrays adding up to 128 parallel (#1446)
* Added batch mode to Processing Arrays simulating up to 128 back-to-back recipe completions
* Fix copy-paste mistake
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r-- | src/main/java/gregtech/api/util/GT_Recipe.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 26cff0b262..a498754451 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -538,7 +538,16 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public boolean isRecipeInputEqual( boolean aDecreaseStacksizeBySuccess, FluidStack[] aFluidInputs, ItemStack... aInputs) { - return isRecipeInputEqual(aDecreaseStacksizeBySuccess, false, aFluidInputs, aInputs); + return isRecipeInputEqual(aDecreaseStacksizeBySuccess, false, 1, aFluidInputs, aInputs); + } + + // For non-multiplied recipe amount values + public boolean isRecipeInputEqual( + boolean aDecreaseStacksizeBySuccess, + boolean aDontCheckStackSizes, + FluidStack[] aFluidInputs, + ItemStack... aInputs) { + return isRecipeInputEqual(aDecreaseStacksizeBySuccess, aDontCheckStackSizes, 1, aFluidInputs, aInputs); } /** @@ -563,6 +572,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { public boolean isRecipeInputEqual( boolean aDecreaseStacksizeBySuccess, boolean aDontCheckStackSizes, + int amountMultiplier, FluidStack[] aFluidInputs, ItemStack... aInputs) { if (mInputs.length > 0 && aInputs == null) return false; @@ -581,7 +591,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { for (FluidStack recipeFluidCost : mFluidInputs) { if (recipeFluidCost != null) { inputFound = false; - remainingCost = recipeFluidCost.amount; + remainingCost = recipeFluidCost.amount * amountMultiplier; for (int i = 0; i < aFluidInputs.length; i++) { FluidStack providedFluid = aFluidInputs[i]; @@ -620,7 +630,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { ItemStack unifiedItemCost = GT_OreDictUnificator.get_nocopy(true, recipeItemCost); if (unifiedItemCost != null) { inputFound = false; - remainingCost = recipeItemCost.stackSize; + remainingCost = recipeItemCost.stackSize * amountMultiplier; for (int i = 0; i < aInputs.length; i++) { ItemStack providedItem = aInputs[i]; |