diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-03-01 03:00:51 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-03-01 03:00:51 +0000 |
commit | 35522722af5dddea144c841a71f4fa9087e68966 (patch) | |
tree | 39f2e3908901026411d9b0ca77d4416ffb8d18cb /src/Java/gtPlusPlus/xmod/tinkers/util | |
parent | a5f5766e189593f8cfe7fbef862b1bb77207720e (diff) | |
download | GT5-Unofficial-35522722af5dddea144c841a71f4fa9087e68966.tar.gz GT5-Unofficial-35522722af5dddea144c841a71f4fa9087e68966.tar.bz2 GT5-Unofficial-35522722af5dddea144c841a71f4fa9087e68966.zip |
% More work on TiCon Compat.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/tinkers/util')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/Java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java b/src/Java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java index b902e38a1e..450111a113 100644 --- a/src/Java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java +++ b/src/Java/gtPlusPlus/xmod/tinkers/util/TinkersUtils.java @@ -251,7 +251,7 @@ public class TinkersUtils { public static boolean addCastingTableRecipe(ItemStack output, FluidStack metal, ItemStack cast, boolean consume, int delay) { if (mMethodCache.get("addCastingTableRecipe") == null) { - Method m = ReflectionUtils.getMethod(ReflectionUtils.getClass("tconstruct.library.crafting.LiquidCasting"), "addBasinRecipe", ItemStack.class, FluidStack.class, ItemStack.class, boolean.class, int.class); + Method m = ReflectionUtils.getMethod(ReflectionUtils.getClass("tconstruct.library.crafting.LiquidCasting"), "addCastingRecipe", ItemStack.class, FluidStack.class, ItemStack.class, boolean.class, int.class); mMethodCache.put("addCastingTableRecipe", m); } try { @@ -270,15 +270,30 @@ public class TinkersUtils { public static Object getCastingInstance(int aType) { + + + + Method m = null; if (aType == 0) { - return ReflectionUtils.invokeVoid(getTiConDataInstance(1), "getTableCasting", new Class[] {}, new Object[] {}); + m = ReflectionUtils.getMethod(getTiConDataInstance(1), "getTableCasting", new Class[] {}); + //return ReflectionUtils.invokeVoid(getTiConDataInstance(1), "getTableCasting", new Class[] {}, new Object[] {}); } else if (aType == 1) { - return ReflectionUtils.invokeVoid(getTiConDataInstance(1), "getBasinCasting", new Class[] {}, new Object[] {}); + m = ReflectionUtils.getMethod(getTiConDataInstance(1), "getBasinCasting", new Class[] {}); + //return ReflectionUtils.invokeVoid(getTiConDataInstance(1), "getBasinCasting", new Class[] {}, new Object[] {}); } else { - return null; - } + //return null; + } + + if (m != null) { + try { + return m.invoke(getTiConDataInstance(1), new Object[] {}); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + } + } + return null; } @@ -346,7 +361,7 @@ public class TinkersUtils { public static void addToolMaterial(int id, Object aToolMaterial) { setRegistries(); if (mMethodCache.get("addToolMaterial") == null) { - Method m = ReflectionUtils.getMethod(mTinkersRegistryClass, "addToolMaterial", int.class, mToolMaterialClass); + Method m = ReflectionUtils.getMethod(mTinkersRegistryClass, "addtoolMaterial", int.class, mToolMaterialClass); mMethodCache.put("addToolMaterial", m); } try { |