collect

public Unit collect(ServerWorld world, BlockPos pos, BlockState state, BlockEntity blockEntity, Entity destroyer, ItemStack tool)(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


public abstract Unit collect(BlockPos pos, BlockState state, ItemStack tool, List<ItemStack> droppedStacks)(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