aboutsummaryrefslogtreecommitdiff
path: root/main/java/gregtech/api/util
diff options
context:
space:
mode:
authorBlood-Asp <Blood@Asp>2015-05-16 02:51:56 +0200
committerBlood-Asp <Blood@Asp>2015-05-16 02:51:56 +0200
commit1209f95bc278f81de4143a619696048c655313e8 (patch)
treec8f348649814938a38d90756c96a1d6b9c3e260b /main/java/gregtech/api/util
parent277e3ddfd28fcee2d1c9774870daf1c3e21a6c0f (diff)
downloadGT5-Unofficial-1209f95bc278f81de4143a619696048c655313e8.tar.gz
GT5-Unofficial-1209f95bc278f81de4143a619696048c655313e8.tar.bz2
GT5-Unofficial-1209f95bc278f81de4143a619696048c655313e8.zip
update 5.08.13
Turbine items and achievements
Diffstat (limited to 'main/java/gregtech/api/util')
-rw-r--r--main/java/gregtech/api/util/GT_ModHandler.java80
1 files changed, 80 insertions, 0 deletions
diff --git a/main/java/gregtech/api/util/GT_ModHandler.java b/main/java/gregtech/api/util/GT_ModHandler.java
index 6f44731c62..91addfbdec 100644
--- a/main/java/gregtech/api/util/GT_ModHandler.java
+++ b/main/java/gregtech/api/util/GT_ModHandler.java
@@ -16,6 +16,7 @@ import ic2.api.reactor.IReactorComponent;
import ic2.api.recipe.IRecipeInput;
import ic2.api.recipe.RecipeInputItemStack;
import ic2.api.recipe.RecipeOutput;
+import ic2.core.AdvRecipe;
import java.util.*;
import java.util.Map.Entry;
@@ -1010,6 +1011,85 @@ public class GT_ModHandler {
return rReturn;
}
+// public static int replaceRecipe(ItemStack aOldItem, ItemStack aNewItem){
+// int replaced =0;
+// ArrayList<IRecipe> tList = (ArrayList<IRecipe>)CraftingManager.getInstance().getRecipeList();
+// System.out.println("tList.size "+tList.size());
+// for (int i = 0; i < tList.size(); i++){
+// System.out.println(tList.get(i).getClass());
+// if(tList.get(i) instanceof ShapedRecipes){
+// ShapedRecipes tRecipe = (ShapedRecipes)tList.get(i);
+// System.out.println("found recipe!");
+// for( int g =0 ; g < tRecipe.recipeItems.length;g++){
+// if(GT_Utility.areStacksEqual(aOldItem, tRecipe.recipeItems[g], true)){
+// ItemStack[] tItems = tRecipe.recipeItems;
+// for(int f = 0; f < tItems.length;f++){
+// if(GT_Utility.areStacksEqual(aOldItem, tItems[f], true)){
+// tItems[f]=aNewItem;
+// }
+// }
+// ShapedRecipes nRecipe = new ShapedRecipes(tRecipe.recipeWidth,tRecipe.recipeHeight,tItems,tRecipe.getRecipeOutput());
+// tList.set(i, nRecipe);
+// replaced++;
+// }
+// }
+// }
+//
+// if(tList.get(i) instanceof AdvRecipe){
+// AdvRecipe tRecipe = (AdvRecipe)tList.get(i);
+// System.out.println("found recipe!");
+// for( int g =0 ; g < tRecipe.input.length;g++){
+// if(GT_Utility.areStacksEqual(aOldItem, (ItemStack) tRecipe.input[g], true)){
+// ItemStack[] tItems = (ItemStack[]) tRecipe.input;
+// for(int f = 0; f < tItems.length;f++){
+// if(GT_Utility.areStacksEqual(aOldItem, tItems[f], true)){
+// tItems[f]=aNewItem;
+// }
+// }
+// System.out.println("converted Recipe");
+// AdvRecipe nRecipe = new AdvRecipe(tRecipe.getRecipeOutput(),tItems);
+// tList.set(i, nRecipe);
+// replaced++;
+// }
+// }
+// }
+//// if(tList.get(i) instanceof GT_Shaped_Recipe){
+//// GT_Shaped_Recipe tRecipe = (GT_Shaped_Recipe)tList.get(i);
+//// System.out.println("found recipe!");
+//// for( int g =0 ; g < tRecipe.getInput().length;g++){
+//// if(GT_Utility.areStacksEqual(aOldItem, (ItemStack)tRecipe.getInput()[g], true)){
+//// ItemStack[] tItems = (ItemStack[]) tRecipe.getInput();
+//// for(int f = 0; f < tItems.length;f++){
+//// if(GT_Utility.areStacksEqual(aOldItem, tItems[f], true)){
+//// tItems[f]=aNewItem;
+//// }
+//// }
+//// GT_Shaped_Recipe nRecipe = new GT_Shaped_Recipe(tItems,tRecipe.getRecipeOutput());
+//// tList.set(i, nRecipe);
+//// replaced++;
+//// }
+//// }
+//// }
+// if(tList.get(i) instanceof ShapelessRecipes){
+// ShapelessRecipes tRecipe = (ShapelessRecipes)tList.get(i);
+// System.out.println("found recipe!");
+// for( int g =0 ; g < tRecipe.recipeItems.size();g++){
+// if(GT_Utility.areStacksEqual(aOldItem, (ItemStack) tRecipe.recipeItems.get(g), true)){
+// List tItems = tRecipe.recipeItems;
+// for(int f = 0; f < tItems.size();f++){
+// if(GT_Utility.areStacksEqual(aOldItem, (ItemStack) tItems.get(f), true)){
+// tItems.set(f,aNewItem);
+// }
+// }
+// ShapelessRecipes nRecipe = new ShapelessRecipes(tRecipe.getRecipeOutput(),tItems);
+// tList.set(i, nRecipe);
+// replaced++;
+// }
+// }
+// }
+// }return replaced;
+// }
+
public static boolean removeRecipeByOutput(ItemStack aOutput) {
return removeRecipeByOutput(aOutput, T, F, F);
}