clickBlock

fun clickBlock(blockPos: BlockPos, range: Double = 10.0): Boolean

Interacts with the block at the gives blockpos with the currently held item. performs a check whether that block is in the specified range first. Returns true when the block is clicked, and false when it is out of range and the click is aborted.