From 02c185e70e23c3c826e26e2ca4ddf5dbb056af71 Mon Sep 17 00:00:00 2001 From: Jordan Byrne Date: Sat, 9 Dec 2017 19:19:30 +1000 Subject: + Added a config option to disable Zombie Reinforcements. % Redid some Circuit handling for recipes. $ Fixed Component Assembler recipes not using all circuits per tier for recipes. --- src/Java/gtPlusPlus/core/util/item/ItemUtils.java | 16 ++++++++ .../gtPlusPlus/core/util/recipe/RecipeUtils.java | 45 ++++++++++++++++++++++ 2 files changed, 61 insertions(+) (limited to 'src/Java/gtPlusPlus/core/util') diff --git a/src/Java/gtPlusPlus/core/util/item/ItemUtils.java b/src/Java/gtPlusPlus/core/util/item/ItemUtils.java index 852dde6a4b..71b37ebf48 100644 --- a/src/Java/gtPlusPlus/core/util/item/ItemUtils.java +++ b/src/Java/gtPlusPlus/core/util/item/ItemUtils.java @@ -684,6 +684,22 @@ public class ItemUtils { Utils.LOG_INFO("[Component Maker] Found "+mItemName+"."); return (gregstack); } + + public static ItemStack[] getStackOfAllOreDictGroup(String oredictname){ + final ArrayList oreDictList = OreDictionary.getOres(oredictname); + if (!oreDictList.isEmpty()){ + final ItemStack[] returnValues = new ItemStack[oreDictList.size()]; + for (int i=0;i0 ? returnValues : null; + } + else { + return null; + } + } } diff --git a/src/Java/gtPlusPlus/core/util/recipe/RecipeUtils.java b/src/Java/gtPlusPlus/core/util/recipe/RecipeUtils.java index 8a138366ba..7d094b7a43 100644 --- a/src/Java/gtPlusPlus/core/util/recipe/RecipeUtils.java +++ b/src/Java/gtPlusPlus/core/util/recipe/RecipeUtils.java @@ -322,6 +322,51 @@ public class RecipeUtils { + public static boolean addShapedGregtechRecipeForTypes( + final Object InputItem1, final Object InputItem2, final Object InputItem3, + final Object InputItem4, final Object InputItem5, final Object InputItem6, + final Object InputItem7, final Object InputItem8, final Object InputItem9, + final ItemStack OutputItem){ + + int using = 0, recipeSlotCurrent = 0; + boolean[] hasMultiStack = new boolean[9]; + boolean inUse[] = {false, false, false}; + ItemStack array[][] = new ItemStack[3][9]; + + Object[] inputs = { + InputItem1, InputItem2, InputItem3, + InputItem4, InputItem5, InputItem6, + InputItem7, InputItem8, InputItem9}; + + for (Object o : inputs){ + if (o.getClass().isArray()){ + if (inUse[using] == false){ + inUse[using] = true; + array[using] = (ItemStack[]) o; + hasMultiStack[recipeSlotCurrent] = true; + using++; + } + } + else { + hasMultiStack[recipeSlotCurrent] = false; + } + recipeSlotCurrent++; + } + + int using2 = 0; + for (boolean t : inUse){ + + if (t){ + if (array[using2] != null){ + //addShapedGregtechRecipe + } + } + using2++; + } + + + return false; + } -- cgit