isInteractable

fun Block?.isInteractable(blockState: BlockState?): Boolean

Checks if the block can be interacted with, null will be returned as not interactable. The blockState is optional but can make the result more accurate, if not provided it will just assume the block is interactable.

Note: The player is required to NOT be null.

This data has been collected by looking at the implementations of BlockBehaviour.useWithoutItem.


val BlockState?.isInteractable: Boolean