aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/loaders/misc
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2021-12-13 22:00:33 +0100
committerGitHub <noreply@github.com>2021-12-13 22:00:33 +0100
commit628fe2f0da60e08dcb3a6f900ce8e48278b8e639 (patch)
treee3f0a65ec0616d0492be2a12b9e20f0fc320b88d /src/Java/gtPlusPlus/xmod/gregtech/loaders/misc
parentc2b4f33d9e7b3dbfdb430a33349741eb1e6f2758 (diff)
parenta52711dc135c700b0e72f49330e513523ff49d0f (diff)
downloadGT5-Unofficial-628fe2f0da60e08dcb3a6f900ce8e48278b8e639.tar.gz
GT5-Unofficial-628fe2f0da60e08dcb3a6f900ce8e48278b8e639.tar.bz2
GT5-Unofficial-628fe2f0da60e08dcb3a6f900ce8e48278b8e639.zip
Merge pull request #67 from GTNewHorizons/Misc2
Rare Earth Changes + Minor bug fixes
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/loaders/misc')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java39
1 files changed, 8 insertions, 31 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java
index e84ce73a47..2e6de159d0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java
@@ -1,51 +1,28 @@
package gtPlusPlus.xmod.gregtech.loaders.misc;
-import java.lang.reflect.Method;
-
import gregtech.api.util.GTPP_Recipe;
+import gregtech.api.util.GT_ProcessingArray_Manager;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
+import gtPlusPlus.api.objects.Logger;
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});
- }
-
+ Logger.INFO("Attempting to add map "+aMap.mNEIName+" to Processing Array for Meta Tile "+aID+". Success? "+GT_ProcessingArray_Manager.registerRecipeMapForMeta(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);
- }
- }
+ for (int i=aMin; i<=aMax;i++) {
+ registerRecipeMapForID(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);
-
+
}
}