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

Fix steam multis now overclocking recipes which consume 2 eu/t #715

Merged
merged 2 commits into from
Aug 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ protected ProcessingLogic createProcessingLogic() {
@Override
protected void setProcessingLogicPower(ProcessingLogic logic) {
logic.setAvailableVoltage(V[1]);
// We need to trick the GT_ParallelHelper we have enough amps for all recipe parallels, but also make sure we
// don't use them for overclocking so we will disable amperageOC
// We need to trick the GT_ParallelHelper we have enough amps for all recipe parallels.
logic.setAvailableAmperage(getMaxParallelRecipes());
logic.setAmperageOC(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
import static gregtech.api.GregTech_API.sBlockCasings1;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;

import javax.annotation.Nonnull;

import net.minecraft.item.ItemStack;

import org.jetbrains.annotations.NotNull;

import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
Expand All @@ -20,6 +24,7 @@
import gregtech.api.logic.ProcessingLogic;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_OverclockCalculator;
import gregtech.api.util.GT_Recipe;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_SteamMultiBase;
Expand Down Expand Up @@ -122,7 +127,14 @@ public GT_Recipe.GT_Recipe_Map getRecipeMap() {

@Override
protected ProcessingLogic createProcessingLogic() {
return super.createProcessingLogic().setMaxParallel(getMaxParallelRecipes());
return new ProcessingLogic() {

@Override
@Nonnull
protected GT_OverclockCalculator createOverclockCalculator(@NotNull GT_Recipe recipe) {
return GT_OverclockCalculator.ofNoOverclock(recipe);
}
}.setMaxParallel(getMaxParallelRecipes());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

import net.minecraft.item.ItemStack;

import org.jetbrains.annotations.NotNull;

import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
Expand All @@ -26,6 +28,7 @@
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.objects.XSTR;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_OverclockCalculator;
import gregtech.api.util.GT_ParallelHelper;
import gregtech.api.util.GT_Recipe;
import gtPlusPlus.core.lib.CORE;
Expand Down Expand Up @@ -147,6 +150,13 @@ public GT_ParallelHelper createParallelHelper(@Nonnull GT_Recipe recipe) {
return items.toArray(new ItemStack[0]);
});
}

@Override
@Nonnull
protected GT_OverclockCalculator createOverclockCalculator(@NotNull GT_Recipe recipe) {
return GT_OverclockCalculator.ofNoOverclock(recipe);
}

}.setMaxParallel(getMaxParallelRecipes());
}
}