From 0dc9a233b2b4794c91926c70114122c2c2391e7d Mon Sep 17 00:00:00 2001 From: TheDarkDnKTv Date: Tue, 18 May 2021 23:14:14 +0300 Subject: [PATCH] Tweaked TE recipes energy amount Now all TE recipes if enabled, will work normal speed. No OP. --- .../gregtechmod/api/util/GT_ModHandler.java | 18 +++++++++--------- .../oreprocessing/ProcessingDustSmall.java | 4 +--- .../oreprocessing/ProcessingDustTiny.java | 4 ++-- .../postload/GT_MachineRecipeLoader.java | 8 ++++---- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/main/java/gregtechmod/api/util/GT_ModHandler.java b/src/main/java/gregtechmod/api/util/GT_ModHandler.java index f9adc25..3ddc0ff 100644 --- a/src/main/java/gregtechmod/api/util/GT_ModHandler.java +++ b/src/main/java/gregtechmod/api/util/GT_ModHandler.java @@ -330,7 +330,7 @@ public class GT_ModHandler { boolean temp = false; if (aInput.stackSize == 1 && addSmeltingRecipe(aInput, aOutput)) temp = true; if (RecipeMaps.ALLOY_SMELTING.factory().EUt(3).duration(160).input(aInput).output(aOutput).buildAndRegister()) temp = true; - if (addInductionSmelterRecipe(aInput, null, aOutput, null, aOutput.stackSize*100, 0)) temp = true; + if (addInductionSmelterRecipe(aInput, null, aOutput, null, aOutput.stackSize * 800, 0)) temp = true; return temp; } @@ -468,9 +468,9 @@ public class GT_ModHandler { if (Materials.Wood.contains(aOutput1)) { if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Machines.pulverization, aInput, true)) { if (aOutput2 == null) - addSawmillRecipe(GT_Utility.copy(aInput), 80, GT_Utility.copy(aOutput1)); + addSawmillRecipe(GT_Utility.copy(aInput), 1200, GT_Utility.copy(aOutput1)); else - addSawmillRecipe(GT_Utility.copy(aInput), 80, aChance<=0?10:aChance, GT_Utility.copy(aOutput1), GT_Utility.copy(aOutput2)); + addSawmillRecipe(GT_Utility.copy(aInput), 1200, aChance<=0?10:aChance, GT_Utility.copy(aOutput1), GT_Utility.copy(aOutput2)); } } else { @@ -484,7 +484,7 @@ public class GT_ModHandler { } catch(Throwable e) {/*Do nothing*/} } if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Machines.pulverization, aInput, true)) { - addTEPulveriserRecipe(GT_Utility.copy(aInput), GT_Utility.copy(aOutput1), GT_Utility.copy(aOutput2), aChance<=0?10:aChance, 80); + addTEPulveriserRecipe(GT_Utility.copy(aInput), GT_Utility.copy(aOutput1), GT_Utility.copy(aOutput2), aChance<=0?10:aChance, 2400); } } } @@ -521,7 +521,7 @@ public class GT_ModHandler { } if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Machines.pulverization, aInput.oreDictName, true)) { - addTEPulveriserRecipe(GT_Utility.copy(aInput.ores.get(0)), GT_Utility.copy(aOutput1), GT_Utility.copy(aOutput2), aChance<=0?10:aChance, 80); + addTEPulveriserRecipe(GT_Utility.copy(aInput.ores.get(0)), GT_Utility.copy(aOutput1), GT_Utility.copy(aOutput2), aChance<=0?10:aChance, 2400); } } } @@ -533,7 +533,7 @@ public class GT_ModHandler { * Adds a Recipe to the Sawmills of GregTech and ThermalCraft */ public static boolean addSawmillRecipe(ItemStack aInput1, ItemStack...outputs) { - return addSawmillRecipe(aInput1, 160, outputs); + return addSawmillRecipe(aInput1, 2400, outputs); } public static boolean addSawmillRecipe(ItemStack aInput1, int aRF, ItemStack...outputs) { @@ -553,7 +553,7 @@ public class GT_ModHandler { * Adds a Recipe to the Sawmills of GregTech and ThermalCraft, but oredict */ public static boolean addSawmillRecipe(OreDictEntry entry, int inAmount, int aChance, ItemStack...outputs) { - return addSawmillRecipe(entry, inAmount, 160, aChance, outputs); + return addSawmillRecipe(entry, inAmount, 2400, aChance, outputs); } public static boolean addSawmillRecipe(OreDictEntry entry, int inAmount, int aRF, int aChance, ItemStack...outputs) { @@ -561,7 +561,7 @@ public class GT_ModHandler { boolean result = false; try { // Accroding on TE code, it saves all recipe OreDict format, so i can just create one recipe - result = cofh.thermalexpansion.util.crafting.SawmillManager.addRecipe(160, entry.ores.get(0), outputs[0], outputs.length > 1 ? outputs[1] : null, aChance, true); + result = cofh.thermalexpansion.util.crafting.SawmillManager.addRecipe(aRF, entry.ores.get(0), outputs[0], outputs.length > 1 ? outputs[1] : null, aChance, true); } catch(Throwable e) {/*Do nothing*/} return result; } @@ -601,7 +601,7 @@ public class GT_ModHandler { aOutput1 = GT_OreDictUnificator.get(true, aOutput1); boolean temp = false; if (RecipeMaps.ALLOY_SMELTING.factory().EUt(aEUt).duration(aDuration).inputs(aInput1, aInput2).output(aOutput1).buildAndRegister()) temp = true; - if (addInductionSmelterRecipe(aInput1, aInput2, aOutput1, null, aDuration * 2, 0)) temp = true; + if (addInductionSmelterRecipe(aInput1, aInput2, aOutput1, null, aDuration * aEUt * 2, 0)) temp = true; return temp; } diff --git a/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingDustSmall.java b/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingDustSmall.java index 63ae931..75c067a 100644 --- a/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingDustSmall.java +++ b/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingDustSmall.java @@ -49,9 +49,7 @@ public class ProcessingDustSmall implements IOreRecipeRegistrator { .output(ingot) .buildAndRegister(); - - for (ItemStack stack : entry.ores) - GT_ModHandler.addInductionSmelterRecipe(GT_Utility.copyAmount(4L, stack), null, ingot, null, 130 * 2, 0); + GT_ModHandler.addInductionSmelterRecipe(GT_Utility.copyAmount(4L, entry.ores.get(0)), null, ingot, null, 130 * 3 * 2, 0); } } } diff --git a/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingDustTiny.java b/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingDustTiny.java index a2887d8..75dc09a 100644 --- a/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingDustTiny.java +++ b/src/main/java/gregtechmod/loaders/oreprocessing/ProcessingDustTiny.java @@ -50,12 +50,12 @@ public class ProcessingDustTiny implements IOreRecipeRegistrator { .output(ingot) .buildAndRegister(); + GT_ModHandler.addInductionSmelterRecipe(GT_Utility.copyAmount(9L, entry.ores.get(0)), null, ingot, null, 130 * 3 * 2, 0); + for (ItemStack stack : entry.ores) { RecipeHandler.executeOnFinish(() -> { GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, stack), GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L)); }); - - GT_ModHandler.addInductionSmelterRecipe(GT_Utility.copyAmount(9L, stack), null, ingot, null, 130 * 2, 0); } } } diff --git a/src/main/java/gregtechmod/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtechmod/loaders/postload/GT_MachineRecipeLoader.java index 85b72d6..ff815b2 100644 --- a/src/main/java/gregtechmod/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtechmod/loaders/postload/GT_MachineRecipeLoader.java @@ -585,7 +585,7 @@ public class GT_MachineRecipeLoader implements Runnable if (tOutputIngot != null) { int dur = (int)tMats[2].mAmount * 50; - GT_ModHandler.addInductionSmelterRecipe(tDust1, tDust2, tOutputIngot, null, dur * 2, 0); + GT_ModHandler.addInductionSmelterRecipe(tDust1, tDust2, tOutputIngot, null, dur * 32, 0); RecipeMaps.ALLOY_SMELTING.factory().EUt(16).duration(dur) .input(OrePrefixes.dust, tMats[0].mMaterial, (int)tMats[0].mAmount) .input(OrePrefixes.dust, tMats[1].mMaterial, (int)tMats[1].mAmount) @@ -593,7 +593,7 @@ public class GT_MachineRecipeLoader implements Runnable if (tIngot1 != null && tIngot2 != null) { - GT_ModHandler.addInductionSmelterRecipe(tIngot1, tIngot2, tOutputIngot, null, dur * 2, 0); + GT_ModHandler.addInductionSmelterRecipe(tIngot1, tIngot2, tOutputIngot, null, dur * 32, 0); RecipeMaps.ALLOY_SMELTING.factory().EUt(16).duration(dur) .input(OrePrefixes.ingot, tMats[0].mMaterial, (int)tMats[0].mAmount) .input(OrePrefixes.ingot, tMats[1].mMaterial, (int)tMats[1].mAmount) @@ -601,7 +601,7 @@ public class GT_MachineRecipeLoader implements Runnable } if (tIngot2 != null) { - GT_ModHandler.addInductionSmelterRecipe(tDust1, tIngot2, tOutputIngot, null, dur * 2, 0); + GT_ModHandler.addInductionSmelterRecipe(tDust1, tIngot2, tOutputIngot, null, dur * 32, 0); RecipeMaps.ALLOY_SMELTING.factory().EUt(16).duration(dur) .input(OrePrefixes.dust, tMats[0].mMaterial, (int)tMats[0].mAmount) .input(OrePrefixes.ingot, tMats[1].mMaterial, (int)tMats[1].mAmount) @@ -609,7 +609,7 @@ public class GT_MachineRecipeLoader implements Runnable } if (tIngot1 != null) { - GT_ModHandler.addInductionSmelterRecipe(tIngot1, tDust2, tOutputIngot, null, dur * 2, 0); + GT_ModHandler.addInductionSmelterRecipe(tIngot1, tDust2, tOutputIngot, null, dur * 32, 0); RecipeMaps.ALLOY_SMELTING.factory().EUt(16).duration(dur) .input(OrePrefixes.ingot, tMats[0].mMaterial, (int)tMats[0].mAmount) .input(OrePrefixes.dust, tMats[1].mMaterial, (int)tMats[1].mAmount)