aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2021-11-28 17:36:30 +0100
committerGitHub <noreply@github.com>2021-11-28 17:36:30 +0100
commitd016a5221be86799ac1264aa7e6231d959bfc796 (patch)
tree816ae8f2e4ce9241249ebc5151d071ffb48b08b1 /src/main/java/gregtech/api
parenta2836a7364c0967e89b0707e7ca5b1df2320f6d9 (diff)
parenta3da11bb7c82ddec2409989314adeb3076c0157b (diff)
downloadGT5-Unofficial-d016a5221be86799ac1264aa7e6231d959bfc796.tar.gz
GT5-Unofficial-d016a5221be86799ac1264aa7e6231d959bfc796.tar.bz2
GT5-Unofficial-d016a5221be86799ac1264aa7e6231d959bfc796.zip
Merge pull request #758 from GTNewHorizons/kill-tiny-dust
Convert tiny dust output in oreproc to chanced full dust output
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r--src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java4
-rw-r--r--src/main/java/gregtech/api/util/GT_ModHandler.java19
2 files changed, 21 insertions, 2 deletions
diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java
index 2267b6c241..9d66e38060 100644
--- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java
+++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java
@@ -407,6 +407,8 @@ public interface IGT_RecipeAdder {
*/
boolean addOreWasherRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidInput, int aDuration, int aEUt);
+ boolean addOreWasherRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidInput, int[] aChances, int aDuration, int aEUt);
+
/**
* Adds an Implosion Compressor Recipe
*
@@ -488,6 +490,8 @@ public interface IGT_RecipeAdder {
*/
boolean addThermalCentrifugeRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int aDuration, int aEUt);
+ boolean addThermalCentrifugeRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt);
+
/**
* Adds an Unboxing Recipe
*/
diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java
index 810a204c40..acd9a294f9 100644
--- a/src/main/java/gregtech/api/util/GT_ModHandler.java
+++ b/src/main/java/gregtech/api/util/GT_ModHandler.java
@@ -797,6 +797,13 @@ public class GT_ModHandler {
/**
* IC2-ThermalCentrifuge Recipe. Overloads old Recipes automatically
*/
+ public static boolean addThermalCentrifugeRecipe(ItemStack aInput, int[] aChances, int aHeat, Object... aOutput) {
+ if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return false;
+ if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.thermalcentrifuge, aInput, true)) return false;
+ RA.addThermalCentrifugeRecipe(aInput, aOutput.length >= 1 ? (ItemStack)aOutput[0] : null, aOutput.length >= 2 ? (ItemStack)aOutput[1] : null, aOutput.length >= 3 ? (ItemStack)aOutput[2] : null, aChances, 500, 48);
+ return true;
+ }
+
public static boolean addThermalCentrifugeRecipe(ItemStack aInput, int aHeat, Object... aOutput) {
if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return false;
if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.thermalcentrifuge, aInput, true)) return false;
@@ -807,11 +814,19 @@ public class GT_ModHandler {
/**
* IC2-OreWasher Recipe. Overloads old Recipes automatically
*/
+ public static boolean addOreWasherRecipe(ItemStack aInput, int[] aChances, int aWaterAmount, Object... aOutput) {
+ if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return false;
+ if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.orewashing, aInput, true)) return false;
+ RA.addOreWasherRecipe(aInput, (ItemStack)aOutput[0], (ItemStack)aOutput[1], (ItemStack)aOutput[2], GT_ModHandler.getWater(aWaterAmount), aChances, 500, 16);
+ RA.addOreWasherRecipe(aInput, (ItemStack)aOutput[0], (ItemStack)aOutput[1], (ItemStack)aOutput[2], GT_ModHandler.getDistilledWater(aWaterAmount / 5), aChances, 300, 16);
+ return true;
+ }
+
public static boolean addOreWasherRecipe(ItemStack aInput, int aWaterAmount, Object... aOutput) {
if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return false;
if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.orewashing, aInput, true)) return false;
- RA.addOreWasherRecipe(aInput, (ItemStack)aOutput[0], (ItemStack)aOutput[1], (ItemStack)aOutput[2], GT_ModHandler.getWater(1000L), 500, 16);
- RA.addOreWasherRecipe(aInput, (ItemStack)aOutput[0], (ItemStack)aOutput[1], (ItemStack)aOutput[2], GT_ModHandler.getDistilledWater(200L), 300, 16);
+ RA.addOreWasherRecipe(aInput, (ItemStack)aOutput[0], (ItemStack)aOutput[1], (ItemStack)aOutput[2], GT_ModHandler.getWater(aWaterAmount), 500, 16);
+ RA.addOreWasherRecipe(aInput, (ItemStack)aOutput[0], (ItemStack)aOutput[1], (ItemStack)aOutput[2], GT_ModHandler.getDistilledWater(aWaterAmount / 5), 300, 16);
return true;
}