* @param type of data to get
* @param def to return on failure
* @return data, or def if not found
*/
public <K> K getWatchedData(int index, Class<K> type, K def) {
WatchableObject object = (WatchableObject) DataWatcherRef.read.invoke(h().getDataWatcher(), index);
if (object == null) {
return def;
}
return Conversion.convert(object.b(), type, def);
}