aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-09-26 23:42:33 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-09-26 23:42:33 +1000
commite56e3fa33d84ca19a3fb0c5e72a60212f30660a7 (patch)
treef754555787121618d7d5923761fc52bb35497ef8 /src
parentd43694eb98a0968190c3dbaa4ab5121c39feaf1f (diff)
downloadGT5-Unofficial-e56e3fa33d84ca19a3fb0c5e72a60212f30660a7.tar.gz
GT5-Unofficial-e56e3fa33d84ca19a3fb0c5e72a60212f30660a7.tar.bz2
GT5-Unofficial-e56e3fa33d84ca19a3fb0c5e72a60212f30660a7.zip
- Disabled Psychedelicraft resources.
% Internal changes to dehydrator recipe handler. % Recipe handler now takes an ItemStack[] not two ItemStacks.
Diffstat (limited to 'src')
-rw-r--r--src/Java/gregtech/api/util/Recipe_GT.java2
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java14
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java32
-rw-r--r--src/Java/gtPlusPlus/xmod/psychedelicraft/HANDLER_Psych.java5
5 files changed, 40 insertions, 19 deletions
diff --git a/src/Java/gregtech/api/util/Recipe_GT.java b/src/Java/gregtech/api/util/Recipe_GT.java
index 94eaa0f927..64e3dd9a35 100644
--- a/src/Java/gregtech/api/util/Recipe_GT.java
+++ b/src/Java/gregtech/api/util/Recipe_GT.java
@@ -234,7 +234,7 @@ public class Recipe_GT extends GT_Recipe{
//public static final Gregtech_Recipe_Map sMatterFabRecipes = new Gregtech_Recipe_Map(new HashSet<GregtechRecipe>(200), "gt.recipe.matterfab", "Matter Fabricator", null, RES_PATH_GUI + "basicmachines/Massfabricator", 1, 3, 1, 1, 1, E, 1, E, true, true);
public static final Gregtech_Recipe_Map_Fuel sRocketFuels = new Gregtech_Recipe_Map_Fuel(new HashSet<GT_Recipe>(10), "gt.recipe.rocketenginefuel", "Rocket Engine Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 3000, " EU", true, true);
public static final Gregtech_Recipe_Map_Fuel sGeoThermalFuels = new Gregtech_Recipe_Map_Fuel(new HashSet<GT_Recipe>(10), "gt.recipe.geothermalfuel", "GeoThermal Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
- public static final GT_Recipe_Map sChemicalDehydratorRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.chemicaldehydrator", "Chemical Dehydrator", null, RES_PATH_GUI + "basicmachines/Dehydrator", 1, 9, 0, 0, 1, E, 1, E, true, true);
+ public static final GT_Recipe_Map sChemicalDehydratorRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.chemicaldehydrator", "Chemical Dehydrator", null, RES_PATH_GUI + "basicmachines/Dehydrator", 2, 9, 0, 0, 1, E, 1, E, true, true);
/**
* HashMap of Recipes based on their Items
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
index 02b7f1bbc8..bb482d96d5 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
@@ -8,6 +8,7 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.item.UtilsItems;
@@ -129,9 +130,17 @@ public class RECIPES_GREGTECH {
30); //EU
}catch (NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}*/
try {
+
+ ItemStack cells = UtilsItems.getItemStackWithMeta(LoadedMods.IndustrialCraft2, "IC2:itemCellEmpty", "Empty Fluid Cells", 0, 12);
+
+ if (cells == null){
+ cells = UtilsItems.getItemStackOfAmountFromOreDictNoBroken("cellEmpty", 12);
+ }
+
+ ItemStack[] input = {cells, UtilsItems.getItemStackOfAmountFromOreDict("dustLepidolite", 20)};
+
CORE.RA.addDehydratorRecipe(
- UtilsItems.getItemStackOfAmountFromOreDict("dustLepidolite", 20), //Item input (slot 1)
- UtilsItems.getItemStackOfAmountFromOreDict("cellEmpty", 12), //Item input (slot 2)
+ input, //Item input (Array, up to 2)
FluidUtils.getFluidStack("sulfuricacid", 10000), //Fluid input (slot 1)
FluidUtils.getFluidStack("sulfuriclithium", 10000), //Fluid output (slot 1)
new ItemStack[]{
@@ -146,6 +155,7 @@ public class RECIPES_GREGTECH {
2000); //EU
}catch (NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+
}
private static void assemblerRecipes(){
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
index 6aada2bdac..96f2cbcfcf 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
@@ -46,10 +46,10 @@ public interface IGregtech_RecipeAdder {
* @return true if the Recipe got added, otherwise false.
*/
- public boolean addDehydratorRecipe(FluidStack aFluid, FluidStack aOutputFluid, ItemStack[] aOutputItems, int aDuration, int aEUt);
+ /*public boolean addDehydratorRecipe(FluidStack aFluid, FluidStack aOutputFluid, ItemStack[] aOutputItems, int aDuration, int aEUt);
public boolean addDehydratorRecipe(ItemStack aInput, FluidStack aFluid, ItemStack[] aOutputItems, int aDuration, int aEUt);
public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack aItemB, ItemStack[] aOutputItems, int aDuration, int aEUt);
- public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack aItemB, FluidStack aFluid, ItemStack[] aOutputItems, FluidStack aOutputFluid, int aDuration, int aEUt);
- public boolean addDehydratorRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack[] aOutputItems, int[] aChances, int aDuration, int aEUt);
+ public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack aItemB, FluidStack aFluid, ItemStack[] aOutputItems, FluidStack aOutputFluid, int aDuration, int aEUt);*/
+ public boolean addDehydratorRecipe(ItemStack[] aInput, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack[] aOutputItems, int[] aChances, int aDuration, int aEUt);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index f5aa8720ef..6374a5f36a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -6,7 +6,6 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.UtilsItems;
import gtPlusPlus.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder;
import gtPlusPlus.xmod.gregtech.recipes.machines.RECIPEHANDLER_CokeOven;
-import gtPlusPlus.xmod.gregtech.recipes.machines.RECIPEHANDLER_Dehydrator;
import gtPlusPlus.xmod.gregtech.recipes.machines.RECIPEHANDLER_MatterFabricator;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
@@ -116,7 +115,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
return true;
}
- @Override
+ /*@Override
public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack aItemB, FluidStack aFluid, ItemStack[] aOutputItems, FluidStack aOutputFluid, int aDuration, int aEUt) {
if ((aItemA == null) || (aItemB == null) || (aOutputItems == null)) {
return false;
@@ -171,24 +170,24 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, null, aOutputItems, null, new FluidStack[]{aFluid}, new FluidStack[]{aOutputFluid}, aDuration, aEUt, 0);
RECIPEHANDLER_Dehydrator.debug5(null, null, aFluid, aOutputFluid, aOutputItems, aDuration, aEUt);
return true;
-}
+}*/
@Override
- public boolean addDehydratorRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack[] aOutputItems, int[] aChances, int aDuration, int aEUt) {
+ public boolean addDehydratorRecipe(ItemStack[] aInput, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack[] aOutputItems, int[] aChances, int aDuration, int aEUt) {
Utils.LOG_INFO("Trying to add a Dehydrator recipe.");
- if (aInput1 != null){
- Utils.LOG_INFO("Recipe requires input: "+aInput1.getDisplayName()+" x"+aInput1.stackSize);
+ if (aInput[0] != null){
+ Utils.LOG_INFO("Recipe requires input: "+aInput[0].getDisplayName()+" x"+aInput[0].stackSize);
}
- if (aInput2 != null){
- Utils.LOG_INFO("Recipe requires input: "+aInput2.getDisplayName()+" x"+aInput2.stackSize);
+ if (aInput[1] != null){
+ Utils.LOG_INFO("Recipe requires input: "+aInput[1].getDisplayName()+" x"+aInput[1].stackSize);
}
if (aFluidInput != null){
Utils.LOG_INFO("Recipe requires input: "+aFluidInput.getFluid().getName()+" "+aFluidInput.amount+"mbst");
}
- if (((aInput1 == null) && (aFluidInput == null)) || ((aOutputItems == null) && (aFluidOutput == null))) {
+ if (((aInput[0] == null) && (aFluidInput == null)) || ((aOutputItems == null) && (aFluidOutput == null))) {
return false;
}
if ((aOutputItems != null) && ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aOutputItems[0], aDuration)) <= 0)) {
@@ -203,7 +202,20 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
if (aFluidOutput != null){
Utils.LOG_INFO("Recipe will output: "+aFluidOutput.getFluid().getName());
}
- Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, aOutputItems, null, aChances, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
+
+
+
+ if (aInput[1] == null){
+ Utils.LOG_INFO("Dehydrator recipe only has a single input item.");
+ Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, aInput, aOutputItems, null, aChances, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
+
+ }
+ else {
+ Utils.LOG_INFO("Dehydrator recipe has two input items.");
+ Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, aInput, aOutputItems, null, aChances, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
+
+ }
+
return true;
}
diff --git a/src/Java/gtPlusPlus/xmod/psychedelicraft/HANDLER_Psych.java b/src/Java/gtPlusPlus/xmod/psychedelicraft/HANDLER_Psych.java
index 2e13745564..84faed5479 100644
--- a/src/Java/gtPlusPlus/xmod/psychedelicraft/HANDLER_Psych.java
+++ b/src/Java/gtPlusPlus/xmod/psychedelicraft/HANDLER_Psych.java
@@ -1,20 +1,19 @@
package gtPlusPlus.xmod.psychedelicraft;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.xmod.psychedelicraft.fluids.PS_Fluids;
public class HANDLER_Psych {
public static void preInit(){
if (LoadedMods.Psychedelicraft){
- PS_Fluids.registerFluids();
+ //PS_Fluids.registerFluids();
}
}
public static void init(){
if (LoadedMods.Psychedelicraft){
- PS_Fluids.registerAlcohols();
+ //PS_Fluids.registerAlcohols();
}
}