diff options
| author | miozune <miozune@gmail.com> | 2023-02-08 17:40:18 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-08 09:40:18 +0100 |
| commit | 8fd4fef38b18244b2e728dce895728b043c70ce7 (patch) | |
| tree | dded1f4879b79a8e54b2e7f876083251d319222a /src/main/java/gtPlusPlus/xmod/gregtech/common/items | |
| parent | ef697bc6094a6a3ab43657ab02c4dec8751da831 (diff) | |
| download | GT5-Unofficial-8fd4fef38b18244b2e728dce895728b043c70ce7.tar.gz GT5-Unofficial-8fd4fef38b18244b2e728dce895728b043c70ce7.tar.bz2 GT5-Unofficial-8fd4fef38b18244b2e728dce895728b043c70ce7.zip | |
Remove a bunch of reflections against GT (#531)
* Remove a bunch of reflections against GT
* missed this one
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common/items')
| -rw-r--r-- | src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java index e59c71c5bd..cd81bfce76 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java @@ -1,14 +1,9 @@ package gtPlusPlus.xmod.gregtech.common.items; -import java.lang.reflect.Field; - import gregtech.api.GregTech_API; import gregtech.api.enums.TC_Aspects; import gregtech.api.enums.ToolDictNames; import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.objects.GT_HashSet; -import gregtech.api.objects.GT_ItemStack; -import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.xmod.gregtech.api.enums.GregtechToolDictNames; import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_AngleGrinder; import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_Choocher; @@ -60,25 +55,8 @@ public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool { new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L) }); - GT_HashSet<GT_ItemStack> aWireCutterList = new GT_HashSet<GT_ItemStack>(); - // 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, "sWireCutterList"); - try { - if (sWireCutterList != null) { - Object val = sWireCutterList.get(null); - if (val != null && val instanceof GT_HashSet) { - aWireCutterList = (GT_HashSet<GT_ItemStack>) val; - } - } - - } catch (IllegalArgumentException | IllegalAccessException e) { - // Not found, so it's GT 5.09.31 or earlier. - } - } - // Electric Wire Cutter - GregTech_API.registerTool( + GregTech_API.registerWireCutter( this.addTool( ELECTRIC_SNIPS, "Automatic Snips", @@ -88,8 +66,7 @@ public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool { ToolDictNames.craftingToolWireCutter, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L), - new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 4L) }), - aWireCutterList); + new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 4L) })); // Electric Lighter this.addTool( |
