get

inline operator fun <T : Any> get(key: CompoundKey<T>): T?(source)

Tries to get the value for the given key and convert it to the given type T.

The access is fast, as it caches deserialized values. But keep in mind that if a value has been deserialized by the game itself it has to be deserialized by Silk once (lazily) before it can be cached into memory.

Note: this function will only return null if the value is not present, it will still throw an exception if cast or conversion to the given type T failed