aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2022-01-29 19:15:48 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2022-01-29 19:15:48 +0000
commitc0da5cc4ea19dfb2a05e64ce09d808b4efdc95b1 (patch)
tree2b549b5dfe3f80421ae2d45e041f929ea46d59aa /src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
parentb926dfb3bc67b74b53749a3e420a8a6ce0fba6a7 (diff)
parent0de849179b344dfddc68393aaa23b3b75b307670 (diff)
downloadGT5-Unofficial-c0da5cc4ea19dfb2a05e64ce09d808b4efdc95b1.tar.gz
GT5-Unofficial-c0da5cc4ea19dfb2a05e64ce09d808b4efdc95b1.tar.bz2
GT5-Unofficial-c0da5cc4ea19dfb2a05e64ce09d808b4efdc95b1.zip
Merge branch 'master' of https://github.com/GTNewHorizons/GTplusplus into St00f
# Conflicts: # .gitignore # dependencies.gradle # src/main/java/gtPlusPlus/core/config/ConfigHandler.java # src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java # src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java # src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java # src/main/resources/assets/miscutils/lang/en_US.lang
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java53
1 files changed, 50 insertions, 3 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index d727da4211..79a9f788df 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -1,6 +1,7 @@
package gtPlusPlus.xmod.gregtech.recipes;
import static gregtech.GT_Mod.GT_FML_LOGGER;
+import static gregtech.api.enums.GT_Values.RA;
import static gtPlusPlus.core.lib.CORE.GTNH;
import java.lang.reflect.InvocationTargetException;
@@ -1267,12 +1268,39 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
@Override
public boolean addFluidExtractionRecipe(ItemStack input, FluidStack output, int aTime, int aEu) {
- return MaterialGenerator.addFluidExtractionRecipe(GT_Values.NI, input, output, aTime, aEu);
+
+ boolean aRecipe = RA.addFluidSmelterRecipe(
+ GT_Utility.copyAmount(1, input),
+ null,
+ output,
+ 10000,
+ aTime,
+ aEu,
+ false);
+ if (aRecipe) {
+ Logger.INFO("Added Fluid Extractor Recipe: "
+ + input.getDisplayName() + " and obtain "
+ + output.amount+"mb of "+output.getLocalizedName()
+ +". Time: "+aTime+", Voltage: "
+ +aEu);
+ }
+ return aRecipe;
+
+ //return MaterialGenerator.addFluidExtractionRecipe(GT_Values.NI, input, output, aTime, aEu);
}
@Override
public boolean addFluidExtractionRecipe(ItemStack aEmpty, ItemStack aRemains, FluidStack aFluid, int aDuration, int aEU) {
- return MaterialGenerator.addFluidExtractionRecipe(aEmpty, aRemains, aFluid, aDuration, aEU);
+ boolean aRecipe = RA.addFluidSmelterRecipe(
+ GT_Utility.copyAmount(1, aEmpty),
+ aRemains,
+ aFluid,
+ 10000,
+ aDuration,
+ aEU,
+ false);
+ return aRecipe;
+ //return MaterialGenerator.addFluidExtractionRecipe(aEmpty, aRemains, aFluid, aDuration, aEU);
}
@Override
@@ -1844,7 +1872,26 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
}
-
+ public boolean addMolecularTransformerRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt, int aAmps) {
+ if ((aInput == null) || (aOutput == null)) {
+ return false;
+ }
+ GTPP_Recipe aRecipe = new GTPP_Recipe(
+ false,
+ new ItemStack[] {aInput},
+ new ItemStack[] {aOutput},
+ null,
+ new int[] {10000},
+ new FluidStack[] {},
+ new FluidStack[] {},
+ aDuration,
+ aEUt,
+ aAmps);
+
+ int aSize = GTPP_Recipe_Map.sMolecularTransformerRecipes.mRecipeList.size();
+ GTPP_Recipe_Map.sMolecularTransformerRecipes.add(aRecipe);
+ return GTPP_Recipe_Map.sMolecularTransformerRecipes.mRecipeList.size() > aSize;
+}