Fixed fluid autocrafting breaking when using 2 stacks of the same fluid in a pattern.
Cherry picked from 69753592358a0e361a4e392770e12e6d61e1519b
This commit is contained in:
@@ -13,6 +13,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
- Processing patterns now use the order of items/fluids specified in the pattern
|
||||
by [@necauqua](https://github.com/necauqua) and [@Darkere](https://github.com/Darkere).
|
||||
- Fixed autocrafting task getting stuck if two tasks fulfilled each others requirements.
|
||||
- Fixed fluid autocrafting breaking when using 2 stacks of the same fluid in a pattern.
|
||||
|
||||
## [v1.10.0-beta.4] - 2021-12-28
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ public class CraftingCalculator {
|
||||
FluidStack fromSelf = fluidResults.get(possibleInput, IComparer.COMPARE_NBT);
|
||||
FluidStack fromNetwork = fluidStorageSource.get(possibleInput, IComparer.COMPARE_NBT);
|
||||
|
||||
int remaining = possibleInput.getAmount() * qty;
|
||||
int remaining = ingredient.getCount() * qty;
|
||||
|
||||
if (remaining < 0) { // int overflow
|
||||
throw new CraftingCalculatorException(CalculationResultType.TOO_COMPLEX);
|
||||
|
||||
Reference in New Issue
Block a user