diff options
author | â€huajijam <strhuaji@gmail.com> | 2019-03-18 20:52:30 +0800 |
---|---|---|
committer | â€huajijam <strhuaji@gmail.com> | 2019-03-18 20:52:30 +0800 |
commit | 8b090e1fd20eb4c301996b5e1dfeb78353e595e4 (patch) | |
tree | 52152dd767d195c76baa8fd8bacb14b105aaa146 /src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java | |
parent | 40d7e5da9f5b84213e2c3e4596fdc69b94bd523e (diff) | |
download | GT5-Unofficial-8b090e1fd20eb4c301996b5e1dfeb78353e595e4.tar.gz GT5-Unofficial-8b090e1fd20eb4c301996b5e1dfeb78353e595e4.tar.bz2 GT5-Unofficial-8b090e1fd20eb4c301996b5e1dfeb78353e595e4.zip |
fix a bug
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java index 1343bdc8af..05d00b06d9 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java +++ b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java @@ -45,14 +45,14 @@ public class HANDLER_FR { if (LoadedMods.Forestry){ Class oClass; try { - oClass = Class.forName("forestry.core.proxy.ProxyCommon"); + oClass = ReflectionUtils.getClass("forestry.core.proxy.ProxyCommon"); Object oProxy = ReflectionUtils.getField(oClass, "common"); - if (oProxy != null && oClass.isInstance(oProxy)){ - Method mParticles = oClass.getDeclaredMethod("addBlockDestroyEffects", World.class, int.class, int.class, int.class, Block.class, int.class); + if (oProxy != null && oClass.isInstance(oProxy)){ + Method mParticles = ReflectionUtils.getMethod(oClass, "addBlockDestroyEffects", World.class, int.class, int.class, int.class, Block.class, int.class); mParticles.invoke(oProxy, world, x, y, z, block, 0); } } - catch (ClassNotFoundException | NoSuchFieldException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { } } } |