collect

open override fun collect(world: ServerWorld, pos: BlockPos, state: BlockState, blockEntity: BlockEntity?, destroyer: Entity, tool: ItemStack)(source)

Stores the dropped items of a broken block.

Parameters

world

The world the block was broken in

pos

The position of the broken block

state

The block state broken

blockEntity

The block entity of the block if any

destroyer

The entity breaking the block

tool

The item used to break the block

See also

Block.getDroppedStacks

open override fun collect(pos: BlockPos, state: BlockState, tool: ItemStack, droppedStacks: List<ItemStack>)(source)

Stores the dropped items of a broken block.

Parameters

pos

The position of the broken block

state

The block state broken

tool

The item used to break the block

droppedStacks

The dropped items of the block