diff options
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java index 726ff080b6..80839f0f64 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java @@ -32,8 +32,10 @@ import gtPlusPlus.core.lib.CORE.ConfigSwitches; import gtPlusPlus.core.material.ELEMENT; import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; import gtPlusPlus.core.util.minecraft.RecipeUtils; import gtPlusPlus.core.util.reflect.AddGregtechRecipe; +import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.everglades.gen.gt.WorldGen_GT; import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; import gtPlusPlus.xmod.gregtech.api.util.GTPP_Config; @@ -146,14 +148,18 @@ public class HANDLER_GT { } private static void convertPyroToCokeOven() { - int aCount = 0; - for (GT_Recipe g : GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.mRecipeList) { - if (AddGregtechRecipe.importPyroRecipe(g)) { - aCount++; + if (ReflectionUtils.doesFieldExist(GT_Recipe.GT_Recipe_Map.class, "sPyrolyseRecipes")) { + int aCount = 0; + GT_Recipe_Map aMap = StaticFields59.getPyrolyseRecipeMap(); + if (aMap != null) { + for (GT_Recipe g : aMap.mRecipeList) { + if (AddGregtechRecipe.importPyroRecipe(g)) { + aCount++; + } + } + Logger.INFO("Converted "+aCount+" Pyrolyse recipes into Industrial Coke Oven recipes."); } - } - Logger.INFO("Converted "+aCount+" Pyrolyse recipes into Industrial Coke Oven recipes."); - + } } private static GT_Recipe replaceItemInRecipeWithAnother(GT_Recipe aRecipe, ItemStack aExisting, ItemStack aNewItem) { @@ -356,6 +362,10 @@ public class HANDLER_GT { OrePrefixes.wireGt01.get(Materials.Superconductor)});*/ } else { + + + Materials aPolytetrafluoroethylene = MaterialUtils.getMaterial("Polytetrafluoroethylene", "Plastic"); + Logger.INFO("Adding new hard Shaped recipes for Hulls."); GT_ModHandler.addCraftingRecipe(ItemList.Hull_LuV.get(1), RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, @@ -367,13 +377,13 @@ public class HANDLER_GT { new Object[]{"PHP", "CMC", 'M', ItemList.Casing_ZPM, 'C', OrePrefixes.cableGt01.get(Materials.Naquadah), 'H', CI.getPlate(aTier_ZPM, 1), 'P', - OrePrefixes.plate.get(Materials.Polytetrafluoroethylene)}); + OrePrefixes.plate.get(aPolytetrafluoroethylene)}); GT_ModHandler.addCraftingRecipe(ItemList.Hull_UV.get(1), RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, new Object[]{"PHP", "CMC", 'M', ItemList.Casing_UV, 'C', OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), 'H', CI.getPlate(aTier_UV, 1), 'P', - OrePrefixes.plate.get(Materials.Polytetrafluoroethylene)}); + OrePrefixes.plate.get(aPolytetrafluoroethylene)}); /*GT_ModHandler.addCraftingRecipe(ItemList.Hull_MAX.get(1), RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, new Object[]{"PHP", "CMC", 'M', ItemList.Casing_MAX, 'C', |