diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2017-08-07 23:09:43 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2017-08-07 23:09:43 +1000 |
commit | 137eb049e600788b8a8e050fd393980b6514e51b (patch) | |
tree | 8bb46b3fb9f02bed4d3bf0a7c6c12926349ebf19 /src/Java/gtPlusPlus/core/util | |
parent | f3ec7d2fc4ac502b085016e9dcae7799b717a194 (diff) | |
download | GT5-Unofficial-137eb049e600788b8a8e050fd393980b6514e51b.tar.gz GT5-Unofficial-137eb049e600788b8a8e050fd393980b6514e51b.tar.bz2 GT5-Unofficial-137eb049e600788b8a8e050fd393980b6514e51b.zip |
$ Fixed RTG reflection.
$ Fixed issue where RTGs would revert back to HV after a restart/rejoin.
$ Fixed the Thermal Boiler Assembly.
% Migrated TAE to use slot 96+.
+ Added some extra logging to verify.
$ Made Shelves have textures.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r-- | src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java index dd3adac3bc..c789871b6f 100644 --- a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java +++ b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java @@ -145,19 +145,21 @@ public class ReflectionUtils { } - public static void setByte(Class clazz, String fieldName, byte newValue) throws Exception { - /*Field nameField = getField(clazz, fieldName); + public static void setByte(Object clazz, String fieldName, byte newValue) throws Exception { + Field nameField = getField(clazz.getClass(), fieldName); nameField.setAccessible(true); int modifiers = nameField.getModifiers(); Field modifierField = nameField.getClass().getDeclaredField("modifiers"); modifiers = modifiers & ~Modifier.FINAL; modifierField.setAccessible(true); - modifierField.set(nameField, modifiers); - nameField.set(clazz, newValue);*/ + modifierField.setInt(nameField, modifiers); + //Utils.LOG_INFO("O-"+(byte) nameField.get(clazz) + " | "+newValue); + nameField.setByte(clazz, newValue); + //Utils.LOG_INFO("N-"+(byte) nameField.get(clazz)); - final Field fieldA = clazz.getDeclaredField(fieldName); - fieldA.setAccessible( true ); - fieldA.setByte(clazz, newValue ); + /*final Field fieldA = getField(clazz.getClass(), fieldName); + fieldA.setAccessible(true); + fieldA.setByte(clazz, newValue);*/ } |