Skip to content

Commit

Permalink
make sure boilers and primitive machines work (#1883)
Browse files Browse the repository at this point in the history
Co-authored-by: YoungOnionMC <[email protected]>
  • Loading branch information
YoungOnionMC and YoungOnionMC authored Sep 2, 2024
1 parent 78b7416 commit 1ca8cca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.gregtechceu.gtceu.api.machine.feature.IUIMachine;
import com.gregtechceu.gtceu.api.machine.trait.NotifiableFluidTank;
import com.gregtechceu.gtceu.api.recipe.GTRecipe;
import com.gregtechceu.gtceu.api.recipe.RecipeHelper;
import com.gregtechceu.gtceu.api.recipe.logic.OCParams;
import com.gregtechceu.gtceu.api.recipe.logic.OCResult;
import com.gregtechceu.gtceu.common.data.GTMaterials;
Expand Down Expand Up @@ -261,7 +260,7 @@ public static GTRecipe recipeModifier(MetaMachine machine, @NotNull GTRecipe rec
@NotNull OCResult result) {
if (machine instanceof SteamBoilerMachine boilerMachine) {
recipe = recipe.copy();
result.init(RecipeHelper.getInputEUt(recipe), recipe.duration);
result.init(0, recipe.duration);
if (boilerMachine.isHighPressure)
result.setDuration(result.getDuration() / 2);
// recipe.duration *= 12; // maybe?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ public GTRecipe apply(MetaMachine machine, @NotNull GTRecipe recipe, @NotNull OC
}
}

if (modifiedRecipe != null) {
if (modifiedRecipe != null && result.getDuration() != 0) {
modifiedRecipe.duration = result.getDuration();
if (result.getEut() > 0) {
modifiedRecipe.tickInputs.put(EURecipeCapability.CAP, List.of(new Content(result.getEut(),
ChanceLogic.getMaxChancedValue(), ChanceLogic.getMaxChancedValue(), 0, null, null)));
} else {
} else if (result.getEut() < 0) {
modifiedRecipe.tickOutputs.put(EURecipeCapability.CAP, List.of(new Content(-result.getEut(),
ChanceLogic.getMaxChancedValue(), ChanceLogic.getMaxChancedValue(), 0, null, null)));
}
Expand Down

0 comments on commit 1ca8cca

Please sign in to comment.