Use getRawValue() instead of getValue(), fixes #520

This commit is contained in:
libraryaddict
2020-11-02 04:05:36 +13:00
parent a9bec1ef93
commit 4ef142b098
5 changed files with 12 additions and 10 deletions

View File

@@ -2786,16 +2786,18 @@ public class DisguiseUtilities {
continue;
}
if (watchableObject.getValue() == null) {
Object object = watchableObject.getRawValue();
if (object == null) {
continue;
}
MetaIndex metaIndex = MetaIndex.getMetaIndex(disguiseWatcher, watchableObject.getIndex());
WrappedDataWatcher.WrappedDataWatcherObject obj =
ReflectionManager.createDataWatcherObject(metaIndex, watchableObject.getValue());
ReflectionManager.createDataWatcherObject(metaIndex, object);
newWatcher.setObject(obj, watchableObject.getValue());
newWatcher.setObject(obj, object);
}
} catch (Exception ex) {
ex.printStackTrace();