breakBlock

abstract fun breakBlock(block: Block, tool: ItemStack?, dropsConsumer: DropsConsumer): Boolean(source)

Breaks the block and passes the dropped items to the dropsConsumer, then drops the items it returns on the ground near the block. Mimic calls it only for blocks this provider returns an ID for.

Only items are dropped, without experience and break effects.

Return

false if the block can't be broken.

Parameters

tool

The tool the block is broken with, or null to drop the same items as for a suitable tool without enchantments. An empty stack means the block is broken by hand.