Skip to content

Commit

Permalink
Fix waterline bugs (GTNewHorizons#3107)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAPenguin0 authored Sep 7, 2024
1 parent 543dd4a commit fe53125
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public float calculateFinalSuccessChance() {
public FluidStack getWaterBoostAmount(GTRecipe recipe) {
// Recipes should always be constructed so that output water is always the first fluid output
FluidStack outputWater = recipe.mFluidOutputs[0];
int amount = Math.round(outputWater.amount * WATER_BOOST_NEEDED_FLUID);
int amount = Math.round(outputWater.amount * WATER_BOOST_NEEDED_FLUID * this.effectiveParallel);
return new FluidStack(outputWater.getFluid(), amount);
}

Expand All @@ -337,11 +337,15 @@ public boolean isWaterBoosted(GTRecipe recipe) {

/**
* Consumes all <b>fluid</b> inputs of the current recipe.
* Should only scale the first fluid input with water
*/
public void depleteRecipeInputs() {
for (FluidStack input : this.currentRecipe.mFluidInputs) {
for (int i = 0; i < this.currentRecipe.mFluidInputs.length; ++i) {
FluidStack input = this.currentRecipe.mFluidInputs[i];
FluidStack copyWithParallel = input.copy();
copyWithParallel.amount = input.amount * effectiveParallel;
if (i == 0) {
copyWithParallel.amount = input.amount * effectiveParallel;
}
this.depleteInput(copyWithParallel);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,7 @@ public CheckRecipeResult checkProcessing() {
for (FluidStack fluid : this.storedFluids) {
if (fluid.isFluidEqual(Materials.Ozone.getGas(1L))) {
if (fluid.amount > MAX_OZONE_GAS_FOR_EXPLOSION) {
// TODO: Fix crash in hatch
// this.explodeMultiblock();
this.explodeMultiblock();
}
}
}
Expand Down

0 comments on commit fe53125

Please sign in to comment.