diff options
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/loaders')
21 files changed, 2964 insertions, 2741 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java index d455697330..b56a480c0c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java @@ -1,5 +1,7 @@ package gtPlusPlus.xmod.gregtech.loaders; +import static gregtech.api.recipe.RecipeMaps.alloySmelterRecipes; + import java.util.HashSet; import java.util.Set; @@ -30,34 +32,38 @@ public class RecipeGen_AlloySmelter extends RecipeGen_Base { private void generateRecipes(final Material material) { final int tVoltageMultiplier = material.vVoltageMultiplier; - + final long duration = Math.max(material.getMass() * 2L, 1L); // Nuggets if (ItemUtils.checkForInvalidItems(material.getIngot(1)) - && ItemUtils.checkForInvalidItems(material.getNugget(1))) - GT_Values.RA.addAlloySmelterRecipe( - material.getIngot(1), - ItemList.Shape_Mold_Nugget.get(0), - material.getNugget(9), - (int) Math.max(material.getMass() * 2L, 1L), - tVoltageMultiplier); + && ItemUtils.checkForInvalidItems(material.getNugget(1))) { + GT_Values.RA.stdBuilder() + .itemInputs(material.getIngot(1), ItemList.Shape_Mold_Nugget.get(0)) + .itemOutputs(material.getNugget(9)) + .duration(duration) + .eut(tVoltageMultiplier) + .addTo(alloySmelterRecipes); + } // Gears - if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getGear(1))) - GT_Values.RA.addAlloySmelterRecipe( - material.getIngot(8), - ItemList.Shape_Mold_Gear.get(0), - material.getGear(1), - (int) Math.max(material.getMass() * 2L, 1L), - tVoltageMultiplier); + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) + && ItemUtils.checkForInvalidItems(material.getGear(1))) { + GT_Values.RA.stdBuilder() + .itemInputs(material.getIngot(8), ItemList.Shape_Mold_Gear.get(0)) + .itemOutputs(material.getGear(1)) + .duration(duration) + .eut(tVoltageMultiplier) + .addTo(alloySmelterRecipes); + } // Ingot if (ItemUtils.checkForInvalidItems(material.getIngot(1)) - && ItemUtils.checkForInvalidItems(material.getNugget(1))) - GT_Values.RA.addAlloySmelterRecipe( - material.getNugget(9), - ItemList.Shape_Mold_Ingot.get(0), - material.getIngot(1), - (int) Math.max(material.getMass() * 2L, 1L), - tVoltageMultiplier); + && ItemUtils.checkForInvalidItems(material.getNugget(1))) { + GT_Values.RA.stdBuilder() + .itemInputs(material.getNugget(9), ItemList.Shape_Mold_Ingot.get(0)) + .itemOutputs(material.getIngot(1)) + .duration(duration) + .eut(tVoltageMultiplier) + .addTo(alloySmelterRecipes); + } } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java index 1594568d23..8256b73a44 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java @@ -1,11 +1,15 @@ package gtPlusPlus.xmod.gregtech.loaders; +import static gregtech.api.recipe.RecipeMaps.assemblerRecipes; +import static gregtech.api.util.GT_RecipeBuilder.SECONDS; + import java.util.HashSet; import java.util.Set; import net.minecraft.item.ItemStack; import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_Utility; import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; @@ -33,13 +37,14 @@ public class RecipeGen_Assembler extends RecipeGen_Base { private void generateRecipes(final Material material) { // Frame Box - if (ItemUtils.checkForInvalidItems(new ItemStack[] { material.getRod(1), material.getFrameBox(1) })) - GT_Values.RA.addAssemblerRecipe( - material.getRod(4), - ItemUtils.getGregtechCircuit(4), - material.getFrameBox(1), - 60, - material.vVoltageMultiplier); + if (ItemUtils.checkForInvalidItems(new ItemStack[] { material.getRod(1), material.getFrameBox(1) })) { + GT_Values.RA.stdBuilder() + .itemInputs(material.getRod(4), GT_Utility.getIntegratedCircuit(4)) + .itemOutputs(material.getFrameBox(1)) + .duration(3 * SECONDS) + .eut(material.vVoltageMultiplier) + .addTo(assemblerRecipes); + } // Rotor if (ItemUtils @@ -52,18 +57,29 @@ public class RecipeGen_Assembler extends RecipeGen_Base { material.vVoltageMultiplier); } + @Deprecated private static void addAssemblerRecipe(final ItemStack input1, final ItemStack input2, final ItemStack output1, final int seconds, final int euCost) { - GT_Values.RA.addAssemblerRecipe( - input1, - input2, - FluidUtils.getFluidStack("molten.solderingalloy", 16), - output1, - seconds, - euCost); - GT_Values.RA - .addAssemblerRecipe(input1, input2, FluidUtils.getFluidStack("molten.tin", 32), output1, seconds, euCost); - GT_Values.RA - .addAssemblerRecipe(input1, input2, FluidUtils.getFluidStack("molten.lead", 48), output1, seconds, euCost); + GT_Values.RA.stdBuilder() + .itemInputs(input1, input2) + .itemOutputs(output1) + .fluidInputs(FluidUtils.getFluidStack("molten.solderingalloy", 16)) + .duration(seconds) + .eut(euCost) + .addTo(assemblerRecipes); + GT_Values.RA.stdBuilder() + .itemInputs(input1, input2) + .itemOutputs(output1) + .fluidInputs(FluidUtils.getFluidStack("molten.tin", 32)) + .duration(seconds) + .eut(euCost) + .addTo(assemblerRecipes); + GT_Values.RA.stdBuilder() + .itemInputs(input1, input2) + .itemOutputs(output1) + .fluidInputs(FluidUtils.getFluidStack("molten.lead", 48)) + .duration(seconds) + .eut(euCost) + .addTo(assemblerRecipes); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java index 2d573c9fb7..8213aee95e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java @@ -1,7 +1,13 @@ package gtPlusPlus.xmod.gregtech.loaders; +import static gregtech.api.recipe.RecipeMaps.fluidSolidifierRecipes; +import static gtPlusPlus.api.recipe.GTPPRecipeMaps.alloyBlastSmelterRecipes; + import java.util.ArrayList; +import java.util.Arrays; import java.util.HashSet; +import java.util.List; +import java.util.Objects; import java.util.Set; import net.minecraft.item.ItemStack; @@ -9,11 +15,11 @@ import net.minecraftforge.fluids.FluidStack; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_RecipeBuilder; +import gregtech.api.util.GT_Utility; import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.recipe.GTPPRecipeCategories; -import gtPlusPlus.api.recipe.GTPPRecipeMaps; -import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.ALLOY; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; @@ -46,276 +52,260 @@ public class RecipeGen_BlastSmelter extends RecipeGen_Base { private void generateARecipe(final Material M) { // Add a Blast Smelting Recipe, Let's go! - ItemStack tStack; - if (null != (tStack = M.getDust(1))) { - - final Material[] badMaterials = { FLUORIDES.THORIUM_HEXAFLUORIDE, FLUORIDES.THORIUM_TETRAFLUORIDE, - ALLOY.BLOODSTEEL, NUCLIDE.LiFBeF2ThF4UF4, NUCLIDE.LiFBeF2ZrF4UF4, NUCLIDE.LiFBeF2ZrF4U235 }; - for (final Material R : badMaterials) { - if (M == R) { - return; - } + ItemStack tStack = M.getDust(1); + if (tStack == null) { + return; + } + + final Material[] badMaterials = { FLUORIDES.THORIUM_HEXAFLUORIDE, FLUORIDES.THORIUM_TETRAFLUORIDE, + ALLOY.BLOODSTEEL, NUCLIDE.LiFBeF2ThF4UF4, NUCLIDE.LiFBeF2ZrF4UF4, NUCLIDE.LiFBeF2ZrF4U235 }; + for (final Material R : badMaterials) { + if (M == R) { + return; } + } - // Prepare some Variables - ItemStack[] components; - ArrayList<MaterialStack> tMaterial = new ArrayList<>(); - int inputStackCount = 0; - int fluidAmount = 0; - final boolean doTest = true; - tMaterial = M.getComposites(); + // Prepare some Variables + ItemStack[] components; + ArrayList<MaterialStack> tMaterial = new ArrayList<>(); + int inputStackCount = 0; + int fluidAmount = 0; + final boolean doTest = true; + tMaterial = M.getComposites(); - // This Bad boy here is what dictates unique recipes. - ItemStack circuitGT; + // This Bad boy here is what dictates unique recipes. + ItemStack circuitGT; - // Set a duration - OLD - /* - * int duration = 0; if (M.getMeltingPointK() > 150){ duration = (int) Math.max(M.getMass() / 50L, 1L) * - * M.getMeltingPointK(); } else { duration = (int) Math.max(M.getMass() / 50L, 1L) * 150; } - */ + long aVoltage = MaterialUtils.getVoltageForTier(M.vTier); - long aVoltage = MaterialUtils.getVoltageForTier(M.vTier); + // Set a duration + int duration = 120 * M.vTier * 10; - // Set a duration - NEW - int duration = 120 * M.vTier * 10; + if (M.vTier <= 4) { + duration = 20 * M.vTier * 10; + } + + int mMaterialListSize = 0; + + int mTotalPartsCounter = M.smallestStackSizeWhenProcessing; - if (M.vTier <= 4) { - duration = 20 * M.vTier * 10; + if (M.getComposites() != null) { + for (final gtPlusPlus.core.material.MaterialStack ternkfsdf : M.getComposites()) { + if (ternkfsdf != null) { + mMaterialListSize++; + } } + } else { + mMaterialListSize = 1; + } - int mMaterialListSize = 0; + if (duration <= 0) { + final int second = 20; + duration = 14 * second * mMaterialListSize * 8; + } - int mTotalPartsCounter = M.smallestStackSizeWhenProcessing; + Logger.WARNING("[BAS] Size: " + mMaterialListSize); + + // Make a simple one Material MaterialStack[] and log it for validity. + circuitGT = GT_Utility.getIntegratedCircuit(1); + final ItemStack[] tItemStackTest = new ItemStack[] { circuitGT, tStack }; + inputStackCount = 1; + fluidAmount = 144 * inputStackCount; + Logger.WARNING( + "[BAS] Adding an Alloy Blast Smelter Recipe for " + M.getLocalizedName() + + ". Gives " + + fluidAmount + + "L of molten metal."); + for (int das = 0; das < tItemStackTest.length; das++) { + if (tItemStackTest[das] != null) { + Logger.WARNING( + "[BAS] tMaterial[" + das + + "]: " + + tItemStackTest[das].getDisplayName() + + " Meta: " + + tItemStackTest[das].getItemDamage() + + ", Amount: " + + tItemStackTest[das].stackSize); + } + } - if (M.getComposites() != null) { - for (final gtPlusPlus.core.material.MaterialStack ternkfsdf : M.getComposites()) { - if (ternkfsdf != null) { - mMaterialListSize++; - // mTotalPartsCounter += ternkfsdf.getSmallestStackSizes()[0]; - } - } + final boolean hasMoreInputThanACircuit = (tItemStackTest.length > 1); + + // Generate Recipes for all singular materials that can be made molten. + if (hasMoreInputThanACircuit) { + if (M.requiresBlastFurnace()) { + GT_Values.RA.stdBuilder() + .itemInputs(tItemStackTest) + .fluidOutputs(M.getFluidStack(fluidAmount)) + .duration(duration / (mTotalPartsCounter > 0 ? mTotalPartsCounter : 1)) + .eut(aVoltage) + .recipeCategory(GTPPRecipeCategories.absNonAlloyRecipes) + .addTo(alloyBlastSmelterRecipes); } else { - mMaterialListSize = 1; + Logger.WARNING("[BAS] Failed."); } + } else { + GT_Values.RA.stdBuilder() + .itemInputs(tItemStackTest) + .fluidOutputs(M.getFluidStack(fluidAmount)) + .eut(aVoltage) + .duration(duration / (mTotalPartsCounter > 0 ? mTotalPartsCounter : 1) / 2) + .addTo(alloyBlastSmelterRecipes); + + Logger.WARNING("[BAS] Success."); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.Shape_Mold_Ingot.get(0)) + .itemOutputs(M.getIngot(1)) + .fluidInputs(M.getFluidStack(144)) + .duration(duration / 2) + .eut(60) + .addTo(fluidSolidifierRecipes); + + Logger.WARNING("[BAS] Success, Also added a Fluid solidifier recipe."); + + } + + if (tMaterial == null) { + Logger.WARNING("[BAS] doTest: " + doTest + " | tMaterial == null: true"); + return; + } + + // Reset the Variables for compounds if last recipe was a success. + inputStackCount = 0; + + if (mMaterialListSize <= 1) { + return; + } + // If this Material has some kind of compound list, proceed + + final gtPlusPlus.core.material.MaterialStack[] tempStack = new gtPlusPlus.core.material.MaterialStack[mMaterialListSize]; + circuitGT = GT_Utility.getIntegratedCircuit(mMaterialListSize); - if (duration <= 0) { - final int second = 20; - duration = 14 * second * mMaterialListSize * 8; + // Builds me a MaterialStack[] from the MaterialList of M. + int ooo = 0; + for (final gtPlusPlus.core.material.MaterialStack xMaterial : M.getComposites()) { + if (xMaterial == null) { + ooo++; + continue; } - Logger.WARNING("[BAS] Size: " + mMaterialListSize); + if (xMaterial.getStackMaterial() == null) { + tempStack[ooo] = xMaterial; + ooo++; + continue; + } - // Make a simple one Material MaterialStack[] and log it for validity. - circuitGT = ItemUtils.getGregtechCircuit(1); - final ItemStack[] tItemStackTest = new ItemStack[] { circuitGT, tStack }; - inputStackCount = 1; - fluidAmount = 144 * inputStackCount; Logger.WARNING( - "[BAS] Adding an Alloy Blast Smelter Recipe for " + M.getLocalizedName() - + ". Gives " - + fluidAmount - + "L of molten metal."); - for (int das = 0; das < tItemStackTest.length; das++) { - if (tItemStackTest[das] != null) { - Logger.WARNING( - "[BAS] tMaterial[" + das - + "]: " - + tItemStackTest[das].getDisplayName() - + " Meta: " - + tItemStackTest[das].getItemDamage() - + ", Amount: " - + tItemStackTest[das].stackSize); - } + "[BAS] FOUND: " + xMaterial.getStackMaterial() + .getLocalizedName()); + Logger.WARNING( + "[BAS] ADDING: " + xMaterial.getStackMaterial() + .getLocalizedName()); + tempStack[ooo] = xMaterial; + ooo++; + } + + // Builds me an ItemStack[] of the materials. - Without a circuit - this gets a good count for + // the 144L fluid multiplier + components = new ItemStack[9]; + inputStackCount = 0; + FluidStack componentsFluid = null; + for (int irc = 0; irc < M.getComposites() + .size(); irc++) { + if (M.getComposites() + .get(irc) == null) { + continue; } - final boolean hasMoreInputThanACircuit = (tItemStackTest.length > 1); - - // Generate Recipes for all singular materials that can be made molten. - if (hasMoreInputThanACircuit) { - if (M.requiresBlastFurnace()) { - GT_Values.RA.stdBuilder() - .itemInputs(tItemStackTest) - .fluidOutputs(M.getFluidStack(fluidAmount)) - .duration(duration / (mTotalPartsCounter > 0 ? mTotalPartsCounter : 1)) - .eut(aVoltage) - .recipeCategory(GTPPRecipeCategories.absNonAlloyRecipes) - .addTo(GTPPRecipeMaps.alloyBlastSmelterRecipes); - } else { - Logger.WARNING("[BAS] Failed."); + final int r = (int) M.vSmallestRatio[irc]; + inputStackCount = inputStackCount + r; + if ((M.getComposites() + .get(irc) + .getStackMaterial() + .getState() != MaterialState.SOLID) || !ItemUtils.checkForInvalidItems( + M.getComposites() + .get(irc) + .getDustStack(r))) { + final int xr = r; + if ((xr > 0) && (xr <= 100)) { + final int mathmatics = (r * 1000); + componentsFluid = FluidUtils.getFluidStack( + M.getComposites() + .get(irc) + .getStackMaterial() + .getFluidStack(mathmatics), + mathmatics); } } else { - if (CORE.RA.addBlastSmelterRecipe( - tItemStackTest, - M.getFluidStack(fluidAmount), - 100, - duration / (mTotalPartsCounter > 0 ? mTotalPartsCounter : 1) / 2, - (int) aVoltage)) { - Logger.WARNING("[BAS] Success."); - if (GT_Values.RA.addFluidSolidifierRecipe( - ItemList.Shape_Mold_Ingot.get(0), - M.getFluidStack(144), - M.getIngot(1), - duration / 2, - 60)) { - Logger.WARNING("[BAS] Success, Also added a Fluid solidifier recipe."); - /* - * if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluidStack(144), 100, - * duration/2, 60)){ Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); } if - * (GT_Values.RA.addFluidExtractionRecipe(M.getNugget(1), null, M.getFluidStack(16), 100, - * duration/2/9, 60)){ Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); } - */ - /* - * if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, - * duration/2/4, 60)){ Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); } - * if (GT_Values.RA.addFluidExtractionRecipe(M.getTinyDust(1), null, M.getFluid(16), 100, - * duration/2/9, 60)){ Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe."); } - */ - } + components[irc] = M.getComposites() + .get(irc) + .getUnificatedDustStack(r); + } + } + + // Adds a circuit + if ((mMaterialListSize < 9) && (mMaterialListSize != 0)) { + final ItemStack[] components_NoCircuit = components; + // Builds me an ItemStack[] of the materials. - With a circuit + components = new ItemStack[components_NoCircuit.length + 1]; + for (int fr = 0; fr < components.length; fr++) { + if (fr == 0) { + components[0] = circuitGT; } else { - Logger.WARNING("[BAS] Failed."); + components[fr] = components_NoCircuit[fr - 1]; } } + Logger.WARNING( + "[BAS] Should have added a circuit. mMaterialListSize: " + mMaterialListSize + + " | circuit: " + + components[0].getDisplayName()); + } else { + Logger.WARNING("[BAS] Did not add a circuit. mMaterialListSize: " + mMaterialListSize); + } - if (tMaterial != null) { - // Reset the Variables for compounds if last recipe was a success. - inputStackCount = 0; - - // If this Material has some kind of compound list, proceed - if (mMaterialListSize > 1) { - final gtPlusPlus.core.material.MaterialStack[] tempStack = new gtPlusPlus.core.material.MaterialStack[mMaterialListSize]; - circuitGT = ItemUtils.getGregtechCircuit(mMaterialListSize); - // Just double checking - if (tempStack.length > 1) { - - // Builds me a MaterialStack[] from the MaterialList of M. - int ooo = 0; - for (final gtPlusPlus.core.material.MaterialStack xMaterial : M.getComposites()) { - if (xMaterial != null) { - if (xMaterial.getStackMaterial() != null) { - Logger.WARNING( - "[BAS] FOUND: " + xMaterial.getStackMaterial() - .getLocalizedName()); - Logger.WARNING( - "[BAS] ADDING: " + xMaterial.getStackMaterial() - .getLocalizedName()); - } - tempStack[ooo] = xMaterial; - } - ooo++; - } - - // Builds me an ItemStack[] of the materials. - Without a circuit - this gets a good count for - // the 144L fluid multiplier - components = new ItemStack[9]; - inputStackCount = 0; - FluidStack componentsFluid = null; - for (int irc = 0; irc < M.getComposites() - .size(); irc++) { - if (M.getComposites() - .get(irc) != null) { - final int r = (int) M.vSmallestRatio[irc]; - inputStackCount = inputStackCount + r; - if ((M.getComposites() - .get(irc) - .getStackMaterial() - .getState() != MaterialState.SOLID) - || !ItemUtils.checkForInvalidItems( - M.getComposites() - .get(irc) - .getDustStack(r))) { - final int xr = r; - if ((xr > 0) && (xr <= 100)) { - final int mathmatics = (r * 1000); - componentsFluid = FluidUtils.getFluidStack( - M.getComposites() - .get(irc) - .getStackMaterial() - .getFluidStack(mathmatics), - mathmatics); - } - } else { - components[irc] = M.getComposites() - .get(irc) - .getUnificatedDustStack(r); - } - } - } - - // Adds a circuit - if ((mMaterialListSize < 9) && (mMaterialListSize != 0)) { - final ItemStack[] components_NoCircuit = components; - // Builds me an ItemStack[] of the materials. - With a circuit - components = new ItemStack[components_NoCircuit.length + 1]; - for (int fr = 0; fr < components.length; fr++) { - if (fr == 0) { - components[0] = circuitGT; - } else { - components[fr] = components_NoCircuit[fr - 1]; - } - } - Logger.WARNING( - "[BAS] Should have added a circuit. mMaterialListSize: " + mMaterialListSize - + " | circuit: " - + components[0].getDisplayName()); - } else { - Logger.WARNING("[BAS] Did not add a circuit. mMaterialListSize: " + mMaterialListSize); - } - - // Set Fluid output - fluidAmount = 144 * inputStackCount; - - Logger.WARNING( - "[BAS] Adding an Alloy Blast Smelter Recipe for " + M.getLocalizedName() - + " using it's compound dusts. This material has " - + inputStackCount - + " parts. Gives " - + fluidAmount - + "L of molten metal."); - Logger.WARNING("[BAS] tMaterial.length: " + components.length + "."); - for (int das = 0; das < components.length; das++) { - if (components[das] != null) { - Logger.WARNING( - "[BAS] tMaterial[" + das - + "]: " - + components[das].getDisplayName() - + " Meta: " - + components[das].getItemDamage() - + ", Amount: " - + components[das].stackSize); - } - } - - // Adds Recipe - if (M.requiresBlastFurnace()) { - if (CORE.RA.addBlastSmelterRecipe( - components, - componentsFluid, - M.getFluidStack(fluidAmount), - 100, - duration, - (int) aVoltage)) { - Logger.WARNING("[BAS] Success."); - } else { - Logger.WARNING("[BAS] Failed."); - } - } else { - if (CORE.RA.addBlastSmelterRecipe( - components, - componentsFluid, - M.getFluidStack(fluidAmount), - 100, - duration, - (int) aVoltage / 2)) { - Logger.WARNING("[BAS] Success."); - } else { - Logger.WARNING("[BAS] Failed."); - } - } - } - } - } else { - Logger.WARNING("[BAS] doTest: " + doTest + " | tMaterial != null: " + (tMaterial != null)); + // Set Fluid output + fluidAmount = 144 * inputStackCount; + + Logger.WARNING( + "[BAS] Adding an Alloy Blast Smelter Recipe for " + M.getLocalizedName() + + " using it's compound dusts. This material has " + + inputStackCount + + " parts. Gives " + + fluidAmount + + "L of molten metal."); + Logger.WARNING("[BAS] tMaterial.length: " + components.length + "."); + for (int das = 0; das < components.length; das++) { + if (components[das] != null) { + Logger.WARNING( + "[BAS] tMaterial[" + das + + "]: " + + components[das].getDisplayName() + + " Meta: " + + components[das].getItemDamage() + + ", Amount: " + + components[das].stackSize); } } + + // Adds Recipe + GT_RecipeBuilder builder = GT_Values.RA.stdBuilder(); + List<ItemStack> inputs = Arrays.asList(components); + inputs.removeIf(Objects::isNull); + components = inputs.toArray(new ItemStack[0]); + + builder = builder.itemInputs(components); + if (componentsFluid != null) { + builder.fluidInputs(componentsFluid); + } + builder.fluidOutputs(M.getFluidStack(fluidAmount)); + + if (M.requiresBlastFurnace()) { + builder.eut(aVoltage); + } else { + builder.eut(aVoltage / 2); + } + builder.duration(duration) + .addTo(alloyBlastSmelterRecipes); + Logger.WARNING("[BAS] Success."); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java index 5398a6a0b5..0ac39d39bc 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen |
