diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-04-29 10:30:44 +1000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-04-29 10:30:44 +1000 |
commit | ad4a2b9dec0e470d1eb000a712b2b56d0b7ae930 (patch) | |
tree | fa0ab88027fc549db9aba00caad3bbae3e0dcdf1 /src/Java | |
parent | b08bbbf26215163d94492ccaf485e4774f7aa20a (diff) | |
download | GT5-Unofficial-ad4a2b9dec0e470d1eb000a712b2b56d0b7ae930.tar.gz GT5-Unofficial-ad4a2b9dec0e470d1eb000a712b2b56d0b7ae930.tar.bz2 GT5-Unofficial-ad4a2b9dec0e470d1eb000a712b2b56d0b7ae930.zip |
$ Fixed lots of minor issues with recipes.
% Adjusted cost of Air Intake Hatch mildly.
Diffstat (limited to 'src/Java')
-rw-r--r-- | src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java | 3 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/util/Utils.java | 23 |
2 files changed, 10 insertions, 16 deletions
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java index e9c1da024c..bfd50e0ce1 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -931,6 +931,7 @@ public class RECIPES_Machines { } if (CORE.ConfigSwitches.enableMachine_Pollution && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + RecipeUtils.addShapedGregtechRecipe( "plateCarbon", "plateCarbon", "plateCarbon", "dustCarbon", "dustCarbon", "dustCarbon", @@ -961,7 +962,7 @@ public class RECIPES_Machines { RecipeUtils.addShapedGregtechRecipe( CI.component_Plate[6], ItemList.Casing_Grate.get(1), CI.component_Plate[6], CI.component_Plate[6], aTieredFluidRegulator, CI.component_Plate[6], - CI.getTieredCircuit(5), ItemList.Hatch_Input_IV.get(1), CI.getTieredCircuit(5), + CI.getTieredCircuit(4), ItemList.Hatch_Input_IV.get(1), CI.getTieredCircuit(4), GregtechItemList.Hatch_Air_Intake.get(1)); //ULV diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java index 3b3ba88e88..919d2f13f3 100644 --- a/src/Java/gtPlusPlus/core/util/Utils.java +++ b/src/Java/gtPlusPlus/core/util/Utils.java @@ -928,24 +928,17 @@ public class Utils { return false; } - public static ItemList getValueOfItemList(String string, ItemList aOther) { - try { - Method method = ItemList.class.getDeclaredMethod("values"); - Object obj = method.invoke(null); - String y = Arrays.toString((Object[]) obj); - String[] aCurrentItemsInList = y.split(","); - boolean found = false; - for (String g : aCurrentItemsInList) { - if (g.equals(string)) { - found = true; - break; + public static ItemList getValueOfItemList(String string, ItemList aOther) { + ItemList[] aListValues = ItemList.class.getEnumConstants(); + for (ItemList aItem : aListValues) { + if (aItem != null) { + if (aItem.name().toLowerCase().equals(string)) { + return aItem; } } - if (found) { - return ItemList.valueOf(string); - } } - catch (Throwable t) {} + Logger.INFO("Tried to obtain '"+string+"' from the GT ItemList, however it does not exist."); + Logger.INFO("Using fallback option instead - "+aOther.name()); return aOther; } |