diff options
author | boubou19 <miisterunknown@gmail.com> | 2023-09-22 17:11:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-22 17:11:54 +0200 |
commit | 2e429bb4ca5a4c756cf6e6c131e176217a9c4bd3 (patch) | |
tree | 84646ceffdb12cb18080b89c64f269e0c8c90ba4 /src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java | |
parent | 2e17750625e73ed55af9cbd446593cbc3e04c978 (diff) | |
download | GT5-Unofficial-2e429bb4ca5a4c756cf6e6c131e176217a9c4bd3.tar.gz GT5-Unofficial-2e429bb4ca5a4c756cf6e6c131e176217a9c4bd3.tar.bz2 GT5-Unofficial-2e429bb4ca5a4c756cf6e6c131e176217a9c4bd3.zip |
obliterate RA1 (#2206)
* obliterate RA1 (1/2)
* fix wrong recipe map
* guard clauses
* null check
* spotless apply
* redo null check properly
* update BS
---------
Co-authored-by: chochem <40274384+chochem@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java')
-rw-r--r-- | src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java index 42bad3325d..b17ac6d071 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java @@ -3,6 +3,7 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sBlastRecipes; import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes; import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sHammerRecipes; +import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sMaceratorRecipes; import static gregtech.api.util.GT_RecipeBuilder.SECONDS; import static gregtech.api.util.GT_RecipeConstants.COIL_HEAT; @@ -206,23 +207,28 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra .eut(16) .addTo(sHammerRecipes); - GT_ModHandler.addPulverisationRecipe( - aOreStack, - GT_Utility.mul(2L, tCrushed), - tMaterial.contains(SubTag.PULVERIZING_CINNABAR) - ? GT_OreDictUnificator.get( + int chanceOre2 = tPrimaryByProduct == null ? 0 + : tPrimaryByProduct.stackSize * 10 * aMultiplier * aMaterial.mByProductMultiplier; + chanceOre2 = 100 * chanceOre2; // converting to the GT format, 100% is 10000 + GT_Values.RA.stdBuilder() + .itemInputs(aOreStack) + .itemOutputs( + GT_Utility.mul(2L, tCrushed), + tMaterial.contains(SubTag.PULVERIZING_CINNABAR) ? GT_OreDictUnificator.get( OrePrefixes.crystal, Materials.Cinnabar, GT_OreDictUnificator .get(OrePrefixes.gem, tPrimaryByMaterial, GT_Utility.copyAmount(1L, tPrimaryByProduct), 1L), 1L) - : GT_OreDictUnificator - .get(OrePrefixes.gem, tPrimaryByMaterial, GT_Utility.copyAmount(1L, tPrimaryByProduct), 1L), - tPrimaryByProduct == null ? 0 - : tPrimaryByProduct.stackSize * 10 * aMultiplier * aMaterial.mByProductMultiplier, - GT_OreDictUnificator.getDust(aPrefix.mSecondaryMaterial), - 50, - true); + : GT_OreDictUnificator + .get(OrePrefixes.gem, tPrimaryByMaterial, GT_Utility.copyAmount(1L, tPrimaryByProduct), 1L), + GT_OreDictUnificator.getDust(aPrefix.mSecondaryMaterial)) + .outputChances(10000, chanceOre2, 5000) + .noFluidInputs() + .noFluidOutputs() + .duration(20 * SECONDS) + .eut(2) + .addTo(sMaceratorRecipes); } return true; } |