retrieveData

inline fun <T> retrieveData(key: String, defaultValue: () -> T): T

Retrieves data from the data Compound of this TileEntity. If it can't find anything under the given key, the result of the defaultValue lambda is returned.

Prefer using MutableProviders via storedValue instead.


inline fun <T> retrieveData(type: KType, key: String, defaultValue: () -> T): T

Retrieves data of the specified type or invokes the defaultValue lambda if there is no data stored under the given key.

Prefer using DataAccessors via storedValue instead.