getBehavior

inline fun <T : Any> getBehavior(): T

Gets the first BlockBehavior that is an instance of T, or throws an IllegalStateException if there is none.


fun <T : Any> getBehavior(type: KClass<T>): T
fun <T : Any> getBehavior(type: Class<T>): T

Gets the first BlockBehavior that is an instance of type, or throws an IllegalStateException if there is none.