diff options
author | huajijam <strhuaji@gmail.com> | 2019-03-18 20:48:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-18 20:48:01 +0800 |
commit | 847934e3f0ba597f6d43d5fafdd0e6192d007585 (patch) | |
tree | c82b2784655f51b48c430d0cdd22e70b0523aa11 /src/Java/gtPlusPlus/xmod/eio/handler | |
parent | 40d7e5da9f5b84213e2c3e4596fdc69b94bd523e (diff) | |
parent | f93d9fb323a5aee2ed5c30320998f26bc177d707 (diff) | |
download | GT5-Unofficial-847934e3f0ba597f6d43d5fafdd0e6192d007585.tar.gz GT5-Unofficial-847934e3f0ba597f6d43d5fafdd0e6192d007585.tar.bz2 GT5-Unofficial-847934e3f0ba597f6d43d5fafdd0e6192d007585.zip |
just fix more bugs
just fix more bugs
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/eio/handler')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java b/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java index 6d50f64e6d..5b3210d58a 100644 --- a/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java +++ b/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java @@ -12,6 +12,7 @@ import gregtech.api.enums.Materials; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.xmod.eio.material.MaterialEIO; import net.minecraftforge.event.entity.player.ItemTooltipEvent; @@ -30,11 +31,10 @@ public class HandlerTooltip_EIO { //If it is, reflect in. if (mIngot == null){ try { - oMainClass = Class.forName("crazypants.enderio.EnderIO"); - oIngotClass = Class.forName("crazypants.enderio.material.ItemAlloy"); + oMainClass = ReflectionUtils.getClass("crazypants.enderio.EnderIO"); + oIngotClass = ReflectionUtils.getClass("crazypants.enderio.material.ItemAlloy"); if (oMainClass != null && oIngotClass != null){ - Field oAlloyField = oMainClass.getDeclaredField("itemAlloy"); - oAlloyField.setAccessible(true); + Field oAlloyField = ReflectionUtils.getField(oMainClass, "itemAlloy"); Object oAlloy = oAlloyField.get(oMainClass); if (oAlloy != null){ if (oIngotClass.isInstance(oAlloy) || Item.class.isInstance(oAlloy)){ |