Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HoleFish committed Feb 26, 2024
1 parent 543b118 commit 82f025d
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,24 @@ protected CheckRecipeResult validateRecipe(@NotNull GT_Recipe recipe) {
@NotNull
@Override
protected GT_ParallelHelper createParallelHelper(@NotNull GT_Recipe recipe) {
return super.createParallelHelper(recipeWithMultiplier(recipe));
return super.createParallelHelper(recipeWithMultiplier(recipe, inputFluids));
}
};
}

protected GT_Recipe recipeWithMultiplier(GT_Recipe recipe) {
protected GT_Recipe recipeWithMultiplier(GT_Recipe recipe, FluidStack[] fluidInputs) {
GT_Recipe tRecipe = recipe.copy();
int multiplier = getExpectedMultiplier(recipe.getFluidOutput(0), true);
mExpectedMultiplier = multiplier;
long fluidAmount = 0;
for (FluidStack fluid : fluidInputs) {
if (recipe.mFluidInputs[0].isFluidEqual(fluid)) {
fluidAmount += fluid.amount;
}
}
multiplier = (int) Math.min(multiplier, fluidAmount / recipe.mFluidInputs[0].amount);
multiplier = Math.max(multiplier, 1);
mTimes = multiplier;
tRecipe.mFluidInputs[0].amount *= multiplier;
tRecipe.mFluidOutputs[0].amount *= multiplier;
return tRecipe;
Expand Down

0 comments on commit 82f025d

Please sign in to comment.