From d9c643b36ffa7235ffebaa9e3d886aab16d4c32b Mon Sep 17 00:00:00 2001 From: Martin Robertz Date: Fri, 6 Jan 2023 21:23:59 +0100 Subject: Foil in one step (#476) * foil in one step adapt gt recipe style update dep file * spotless * spotlessApply (#477) Co-authored-by: Martin Robertz Co-authored-by: GitHub GTNH Actions <> * update tec tech * Update dependencies.gradle * Update dependencies.gradle Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../xmod/gregtech/loaders/RecipeGen_Plates.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/main/java/gtPlusPlus') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java index 52053ca90e..15e77ac0f5 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java @@ -9,6 +9,7 @@ import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.minecraft.ItemUtils; import java.util.HashSet; import java.util.Set; @@ -45,6 +46,7 @@ public class RecipeGen_Plates extends RecipeGen_Base { final ItemStack plate_SingleNine = material.getPlate(9); final ItemStack plate_Double = material.getPlateDouble(1); final ItemStack plate_Dense = material.getPlateDense(1); + final ItemStack foil_SingleFour = material.getFoil(4); final ItemStack block = material.getBlock(1); Logger.WARNING("Generating Plate recipes for " + material.getLocalizedName()); @@ -71,6 +73,17 @@ public class RecipeGen_Plates extends RecipeGen_Base { } else { Logger.WARNING("Bender Recipe: " + material.getLocalizedName() + " - Failed"); } + if (ItemUtils.checkForInvalidItems(ingotStackOne) && ItemUtils.checkForInvalidItems(foil_SingleFour)) + if (addBenderRecipe( + ingotStackOne, + CI.getNumberedCircuit(10), + foil_SingleFour, + (int) Math.max(material.getMass() * 2L, 1L), + material.vVoltageMultiplier)) { + Logger.WARNING("Bender Recipe: " + material.getLocalizedName() + " - Success"); + } else { + Logger.WARNING("Bender Recipe: " + material.getLocalizedName() + " - Failed"); + } // Alloy Smelter if (ItemUtils.checkForInvalidItems(ingotStackTwo) && ItemUtils.checkForInvalidItems(plate_Single)) if (GT_Values.RA.addAlloySmelterRecipe( @@ -164,6 +177,15 @@ public class RecipeGen_Plates extends RecipeGen_Base { return GT_Values.RA.addBenderRecipe(aInput1, aOutput1, aDuration, aEUt); } + public static boolean addBenderRecipe( + final ItemStack aInput1, + final ItemStack aCircuit, + final ItemStack aOutput1, + int aDuration, + final int aEUt) { + return GT_Values.RA.addBenderRecipe(aInput1, aCircuit, aOutput1, aDuration, aEUt); + } + public static boolean addExtruderRecipe( final ItemStack aInput, final ItemStack aShape, final ItemStack aOutput, int aDuration, final int aEUt) { if ((aInput == null) || (aShape == null) || (aOutput == null)) { -- cgit