From 8ca23d37495647bda859bc1821c2551cf8b21bf3 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Thu, 10 Oct 2019 22:34:02 +0100 Subject: $ Fixed Wire Cutter handling for 5.09.32+. $ Corrected Rainforest Oak sapling recipes and also fixed the Charcoal Pit Igniter. Further fixes #454. --- .../gregtech/common/items/MetaGeneratedGregtechTools.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java index 2c9ddff4f1..236ae65edb 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java @@ -49,12 +49,15 @@ public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool { GT_HashSet aWireCutterList = new GT_HashSet(); //Does not exist prior to 5.09.32, use an empty field if we can't find the existing one. if (ReflectionUtils.doesFieldExist(GregTech_API.class, "sWireCutterList")) { - Field sWireCutterList = ReflectionUtils.getField(GregTech_API.class, ""); + Field sWireCutterList = ReflectionUtils.getField(GregTech_API.class, "sWireCutterList"); try { - Object val = sWireCutterList.get(null); - if (val != null && val instanceof GT_HashSet) { - aWireCutterList = (GT_HashSet) val; + if (sWireCutterList != null) { + Object val = sWireCutterList.get(null); + if (val != null && val instanceof GT_HashSet) { + aWireCutterList = (GT_HashSet) val; + } } + } catch (IllegalArgumentException | IllegalAccessException e) { // Not found, so it's GT 5.09.31 or earlier. -- cgit