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

Commit

Permalink
CAL CA mode recipe tier nerf (#392)
Browse files Browse the repository at this point in the history
* Do the thing

* spotlessApply (#393)

Co-authored-by: GitHub GTNH Actions <>

* improve tooltip

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: chochem <[email protected]>
  • Loading branch information
3 people authored Feb 20, 2024
1 parent 3cfed6c commit 7978372
Showing 1 changed file with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@
import gregtech.api.recipe.RecipeMap;
import gregtech.api.recipe.RecipeMaps;
import gregtech.api.recipe.check.CheckRecipeResult;
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
import gregtech.api.recipe.check.SimpleCheckRecipeResult;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
Expand Down Expand Up @@ -168,8 +170,9 @@ protected GT_Multiblock_Tooltip_Builder createTooltip() {
"Does Circuit Assembler recipes, Minimum Length: " + EnumChatFormatting.RED
+ MINIMUM_CIRCUIT_ASSEMBLER_LENGTH
+ EnumChatFormatting.GRAY)
.addInfo("Recipe tier in Circuit Assembler mode is at most Energy Hatch tier - 1.")
.addInfo("This mode supports Crafting Input Buffer/Bus and allows bus separation").addInfo("")
.addInfo(BW_Tooltip_Reference.TT_BLUEPRINT).addSeparator()
.addSeparator().addInfo(BW_Tooltip_Reference.TT_BLUEPRINT)
.beginVariableStructureBlock(2, 7, 3, 3, 3, 3, false)
.addStructureInfo("From Bottom to Top, Left to Right")
.addStructureInfo(
Expand Down Expand Up @@ -283,7 +286,19 @@ public Collection<RecipeMap<?>> getAvailableRecipeMaps() {

@Override
protected ProcessingLogic createProcessingLogic() {
return new ProcessingLogic().enablePerfectOverclock();
return new ProcessingLogic() {

@Override
@Nonnull
protected CheckRecipeResult validateRecipe(@Nonnull GT_Recipe recipe) {
// limit CA mode recipes to hatch tier - 1
if (GT_TileEntity_CircuitAssemblyLine.this.mode == 1
&& recipe.mEUt > GT_TileEntity_CircuitAssemblyLine.this.getMaxInputVoltage() / 4) {
return CheckRecipeResultRegistry.NO_RECIPE;
}
return CheckRecipeResultRegistry.SUCCESSFUL;
}
}.enablePerfectOverclock();
}

@NotNull
Expand Down

0 comments on commit 7978372

Please sign in to comment.