aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java3
-rw-r--r--src/Java/gtPlusPlus/core/util/Utils.java23
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;
}