aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java14
-rw-r--r--src/Java/miscutil/core/util/item/UtilsItems.java10
-rw-r--r--src/Java/miscutil/xmod/gregtech/api/util/GregtechRecipe.java19
-rw-r--r--src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java4
4 files changed, 38 insertions, 9 deletions
diff --git a/src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java b/src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java
index f4d55102b7..67b1b2d0e3 100644
--- a/src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java
@@ -110,7 +110,7 @@ public class RECIPES_GREGTECH {
}catch (NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
}
-
+
private static void dehydratorRecipes(){
Utils.LOG_INFO("Loading Recipes for Chemical Dehydrator.");
@@ -122,14 +122,16 @@ public class RECIPES_GREGTECH {
new ItemStack[]{UtilsItems.getItemStackOfAmountFromOreDict("dustDiamond", 1)}, //Output Array of Items - Upto 9
10*20, //Time in ticks
30); //EU
-
+ }catch (NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ try {
CORE.RA.addDehydratorRecipe(
UtilsItems.getItemStackOfAmountFromOreDict("dustSteel", 8), //Item input (slot 1)
UtilsItems.getItemStackOfAmountFromOreDict("dustRedstone", 8), //Item input (slot 2)
new ItemStack[]{UtilsItems.getItemStackOfAmountFromOreDict("dustDiamond", 1)}, //Output Array of Items - Upto 9
10*20, //Time in ticks
30); //EU
-
+ }catch (NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ try {
CORE.RA.addDehydratorRecipe(
UtilsItems.getItemStackOfAmountFromOreDict("dustSteel", 8),
UtilsItems.getItemStackOfAmountFromOreDict("dustRedstone", 8),
@@ -138,9 +140,9 @@ public class RECIPES_GREGTECH {
FluidUtils.getFluidStack("lava", 1000),
10*20, //Time in ticks
30); //EU
-
+
}catch (NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
-
+
}
@@ -170,7 +172,7 @@ public class RECIPES_GREGTECH {
GT_ModHandler.addExtractionRecipe(GregtechItemList.Battery_RE_EV_Cadmium.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(4L, new Object[0]));
GT_ModHandler.addExtractionRecipe(GregtechItemList.Battery_RE_EV_Lithium.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(4L, new Object[0]));
}
-
+
private static void chemicalBathRecipes(){
int[] chances = {10000, 5000, 2500};
GT_Values.RA.addChemicalBathRecipe(UtilsItems.getItemStackOfAmountFromOreDict("dustTin", 12), FluidUtils.getFluidStack("chlorine", 2400),
diff --git a/src/Java/miscutil/core/util/item/UtilsItems.java b/src/Java/miscutil/core/util/item/UtilsItems.java
index bb74234a51..401618df52 100644
--- a/src/Java/miscutil/core/util/item/UtilsItems.java
+++ b/src/Java/miscutil/core/util/item/UtilsItems.java
@@ -312,5 +312,15 @@ public class UtilsItems {
}
}
+
+ public static String getArrayStackNames(ItemStack[] aStack){
+ String itemNames = "Item Array: ";
+ for (ItemStack alph : aStack){
+ String temp = itemNames;
+ itemNames = temp + ", " + alph.getDisplayName() + " x" + alph.stackSize;
+ }
+ return itemNames;
+
+ }
}
diff --git a/src/Java/miscutil/xmod/gregtech/api/util/GregtechRecipe.java b/src/Java/miscutil/xmod/gregtech/api/util/GregtechRecipe.java
index 10163bc3a5..a44315b2eb 100644
--- a/src/Java/miscutil/xmod/gregtech/api/util/GregtechRecipe.java
+++ b/src/Java/miscutil/xmod/gregtech/api/util/GregtechRecipe.java
@@ -23,6 +23,7 @@ import java.util.HashSet;
import java.util.Map;
import miscutil.core.util.Utils;
+import miscutil.core.util.item.UtilsItems;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
@@ -163,6 +164,8 @@ public class GregtechRecipe {
mEUt = aEUt;
// checkCellBalance();
+
+ Utils.LOG_SPECIFIC_WARNING(this.getClass().getName()+" | [GregtechRecipe]", "Created new recipe instance for "+UtilsItems.getArrayStackNames(aInputs), 167);
}
public GregtechRecipe(ItemStack aInput1, ItemStack aOutput1, int aFuelValue, int aType) {
@@ -318,12 +321,12 @@ public class GregtechRecipe {
*/
public static final Collection<Gregtech_Recipe_Map> sMappings = new ArrayList<Gregtech_Recipe_Map>();
//public static final GT_Recipe_Map sChemicalBathRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.chemicalbath", "Chemical Bath", null, RES_PATH_GUI + "basicmachines/ChemicalBath", 1, 3, 1, 1, 1, E, 1, E, true, true);
- public static final GT_Recipe_Map sCokeOvenRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.cokeoven", "Coke Oven", null, RES_PATH_GUI + "basicmachines/ChemicalBath", 2, 2, 1, 0, 1, E, 1, E, true, true);
+ public static final GT_Recipe_Map sCokeOvenRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.cokeoven", "Coke Oven", null, RES_PATH_GUI + "basicmachines/Dehydrator", 2, 2, 1, 0, 1, E, 1, E, true, true);
public static final GT_Recipe_Map sMatterFab2Recipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.matterfab2", "Matter Fabricator", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, E, 1, E, true, true);
//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<GregtechRecipe>(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<GregtechRecipe>(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 Gregtech_Recipe_Map sChemicalDehydratorRecipes = new Gregtech_Recipe_Map(new HashSet<GregtechRecipe>(200), "gt.recipe.chemicaldehydrator", "Chemical Dehydrator", null, RES_PATH_GUI + "basicmachines/Sifter", 1, 1, 0, 0, 1, E, 1, E, true, true);
+ public static final Gregtech_Recipe_Map sChemicalDehydratorRecipes = new Gregtech_Recipe_Map(new HashSet<GregtechRecipe>(200), "gt.recipe.chemicaldehydrator", "Chemical Dehydrator", null, RES_PATH_GUI + "basicmachines/Dehydrator", 1, 1, 0, 0, 1, E, 1, E, true, true);
/**
* HashMap of Recipes based on their Items
@@ -421,12 +424,16 @@ public class GregtechRecipe {
}
protected GregtechRecipe addRecipe(GregtechRecipe aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe, boolean aHidden) {
- Utils.LOG_INFO("Adding Recipe Method 2");
+ Utils.LOG_INFO("Adding Recipe Method 2 - This Checks if hidden, fake or if duplicate recipes exists, I think.");
aRecipe.mHidden = aHidden;
aRecipe.mFakeRecipe = aFakeRecipe;
+ Utils.LOG_INFO("Logging some data about this method: GregtechRecipe["+aRecipe.toString()+"] | aCheckForCollisions["+aCheckForCollisions+"] | aFakeRecipe["+aFakeRecipe+"] | aHidden["+aHidden+"]");
+ Utils.LOG_INFO("Logging some data about this method: mMinimalInputFluids["+mMinimalInputFluids+"] | mMinimalInputItems["+mMinimalInputItems+"] | aRecipe.mFluidInputs.length["+aRecipe.mFluidInputs.length+"] | aRecipe.mInputs.length["+aRecipe.mInputs.length+"]");
if (aRecipe.mFluidInputs.length < mMinimalInputFluids && aRecipe.mInputs.length < mMinimalInputItems){
Utils.LOG_INFO("Step 2 failed");
return null;}
+
+ Utils.LOG_INFO("Logging some data about this method: aCheckForCollisions["+aCheckForCollisions+"] | findRecipe != null ["+(findRecipe(null, false, Long.MAX_VALUE, aRecipe.mFluidInputs, aRecipe.mInputs) != null)+"]");
if (aCheckForCollisions && findRecipe(null, false, Long.MAX_VALUE, aRecipe.mFluidInputs, aRecipe.mInputs) != null){
Utils.LOG_INFO("Step 2 failed - 2");
return null;
@@ -592,6 +599,12 @@ public class GregtechRecipe {
if (tList == null){
Utils.LOG_INFO("Method 4 - brrr list was NUll");
mRecipeItemMap.put(tStack, tList = new HashSet<GregtechRecipe>(1));
+ Utils.LOG_INFO("Method 4 - Attemping backup method for Gt Recipe Hashmap:");
+
+ while (tList.iterator().hasNext()){
+ Utils.LOG_INFO(tList.iterator().next().toString());
+ }
+
}
tList.add(aRecipe);
Utils.LOG_INFO("Method 4 - Added recipe to map? I think.");
diff --git a/src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java
index 13e41ba62b..ae25ede64b 100644
--- a/src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -5,6 +5,7 @@ import miscutil.core.util.Utils;
import miscutil.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder;
import miscutil.xmod.gregtech.api.util.GregtechRecipe;
import miscutil.xmod.gregtech.recipes.machines.RECIPEHANDLER_CokeOven;
+import miscutil.xmod.gregtech.recipes.machines.RECIPEHANDLER_Dehydrator;
import miscutil.xmod.gregtech.recipes.machines.RECIPEHANDLER_MatterFabricator;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
@@ -143,6 +144,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
return false;
}
GregtechRecipe.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, new ItemStack[]{aItemA, aItemB}, aOutputItems.clone(), null, null, null, aDuration, aEUt, 0);
+ RECIPEHANDLER_Dehydrator.debug5(aItemA, aItemB, aFluid, aOutputFluid, aOutputItems, aDuration, aEUt);
return true;
}
}
@@ -158,6 +160,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
return false;
}
GregtechRecipe.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, new ItemStack[]{aItemA, aItemB}, aOutputItems.clone(), null, null, null, aDuration, aEUt, 0);
+ RECIPEHANDLER_Dehydrator.debug5(aItemA, aItemB, null, null, aOutputItems, aDuration, aEUt);
return true;
}
@@ -170,6 +173,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
return false;
}
GregtechRecipe.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutput.clone(), null, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0);
+ RECIPEHANDLER_Dehydrator.debug5(aInput, null, aFluid, null, aOutput, aDuration, aEUt);
return true;
}