From 311ab89f93558233a40079f7cb16605b141b5346 Mon Sep 17 00:00:00 2001 From: Johann Bernhardt Date: Sun, 12 Dec 2021 19:38:06 +0100 Subject: Move sources and resources --- .../loaders/misc/AddCustomMachineToPA.java | 51 ---------------------- 1 file changed, 51 deletions(-) delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java (limited to 'src/Java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java deleted file mode 100644 index e84ce73a47..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java +++ /dev/null @@ -1,51 +0,0 @@ -package gtPlusPlus.xmod.gregtech.loaders.misc; - -import java.lang.reflect.Method; - -import gregtech.api.util.GTPP_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class AddCustomMachineToPA { - - private static final boolean sDoesPatchExist; - private static final Class sManagerPA; - private static final Method sRegisterRecipeMapForMeta; - - static { - sDoesPatchExist = ReflectionUtils.doesClassExist("gregtech.api.util.GT_ProcessingArray_Manager"); - if (sDoesPatchExist) { - sManagerPA = ReflectionUtils.getClass("gregtech.api.util.GT_ProcessingArray_Manager"); - sRegisterRecipeMapForMeta = ReflectionUtils.getMethod(sManagerPA, "registerRecipeMapForMeta", int.class, GT_Recipe_Map.class); - } - else { - sManagerPA = null; - sRegisterRecipeMapForMeta = null; - } - } - - public static final void registerRecipeMapForID(int aID, GT_Recipe_Map aMap) { - if (sDoesPatchExist) { - ReflectionUtils.invokeNonBool(null, sRegisterRecipeMapForMeta, new Object[] {aID, aMap}); - } - - } - - public static final void registerRecipeMapBetweenRangeOfIDs(int aMin, int aMax, GT_Recipe_Map aMap) { - if (sDoesPatchExist) { - for (int i=aMin; i<=aMax;i++) { - ReflectionUtils.invokeNonBool(null, sRegisterRecipeMapForMeta, new Object[] {i, aMap}); - //GT_ProcessingArray_Manager.registerRecipeMapForMeta(i, aMap); - } - } - } - - public static void register() { - - // Simple Washers - registerRecipeMapForID(767, GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes); - registerRecipeMapBetweenRangeOfIDs(31017, 31020, GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes); - - } - -} -- cgit