From 4e1beb536a7d01d50714ec875216bb36a1c82d1c Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Fri, 12 Nov 2021 17:32:28 +0000 Subject: [PATCH] Updated IC2 version. Fixed IC2 IBoxable handler. --- build.properties | 2 +- src/main/java/gregtech/api/util/GT_ModHandler.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build.properties b/build.properties index 599c8cf0..959daa0c 100644 --- a/build.properties +++ b/build.properties @@ -1,4 +1,4 @@ minecraft.version=1.7.10 forge.version=10.13.4.1614-1.7.10 -ic2.version=2.2.790-experimental +ic2.version=2.2.817-experimental gt.version=5.09.31 \ No newline at end of file diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java index 1419ed56..7deb9e37 100644 --- a/src/main/java/gregtech/api/util/GT_ModHandler.java +++ b/src/main/java/gregtech/api/util/GT_ModHandler.java @@ -82,7 +82,7 @@ public class GT_ModHandler { public static volatile int VERSION = 509; public static Collection sNativeRecipeClasses = new HashSet(), sSpecialRecipeClasses = new HashSet(); public static GT_HashSet sNonReplaceableItems = new GT_HashSet(); - public static Object sBoxableWrapper = GT_Utility.callConstructor("gregtechmod.api.util.GT_IBoxableWrapper", 0, null, false); + public static Object sBoxableWrapper = new GT_IBoxableWrapper(); private static Map sExtractorRecipes = new /*Concurrent*/HashMap(); private static Map sMaceratorRecipes = new /*Concurrent*/HashMap(); private static Map sCompressorRecipes = new /*Concurrent*/HashMap(); @@ -1886,11 +1886,13 @@ public class GT_ModHandler { if (aStack != null) registerBoxableItemToToolBox(aStack.getItem()); } - public static void registerBoxableItemToToolBox(Item aItem) { + public static void registerBoxableItemToToolBox(Item aItem) { if (aItem != null && sBoxableWrapper != null) { try { ic2.api.item.ItemWrapper.registerBoxable(aItem, (IBoxable) sBoxableWrapper); - } catch (Throwable e) {/*Do nothing*/} + } catch (Throwable e) { + e.printStackTrace(); + } } }