diff options
author | Jordan Byrne <draknyte1@hotmail.com> | 2018-01-31 22:16:31 +1000 |
---|---|---|
committer | Jordan Byrne <draknyte1@hotmail.com> | 2018-01-31 22:16:31 +1000 |
commit | 7a1c92118a53b5bc6294d65361e16c5859597a10 (patch) | |
tree | 2dba81c7d2eb78e48ceba687af6aaaa1de746289 /src/Java/gtPlusPlus/core/util | |
parent | c793ff869c74bae8c35516042f5ae883aeb270c9 (diff) | |
download | GT5-Unofficial-7a1c92118a53b5bc6294d65361e16c5859597a10.tar.gz GT5-Unofficial-7a1c92118a53b5bc6294d65361e16c5859597a10.tar.bz2 GT5-Unofficial-7a1c92118a53b5bc6294d65361e16c5859597a10.zip |
$ Finished ASM for getDrops() GT fix.
% Mild re-arrangement to CI.java.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r-- | src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java index 2a98f0a75a..a0968fd5c1 100644 --- a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java +++ b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java @@ -16,14 +16,16 @@ public class ReflectionUtils { public static Field getField(final Class clazz, final String fieldName) throws NoSuchFieldException { try { - return clazz.getDeclaredField(fieldName); + Field k = clazz.getDeclaredField(fieldName); + makeAccessible(k); + return k; } catch (final NoSuchFieldException e) { final Class<?> superClass = clazz.getSuperclass(); if (superClass == null) { - //Logger.REFLECTION("Failed to get Field from Class. "+fieldName+" does not existing within "+clazz.getCanonicalName()+"."); + Logger.REFLECTION("Failed to get Field from Class. "+fieldName+" does not existing within "+clazz.getCanonicalName()+"."); throw e; } - //Logger.REFLECTION("Failed to get Field from Class. "+fieldName+" does not existing within "+clazz.getCanonicalName()+". Trying super class."); + Logger.REFLECTION("Failed to get Field from Class. "+fieldName+" does not existing within "+clazz.getCanonicalName()+". Trying super class."); return getField(superClass, fieldName); } } |