ChunkedBlockDropCollector

A block drop collector that merges the dropped items if they're in the same sub-cuboid.

Parameters

box

The volume the blocks will be broken inside. Calling collect with a position outside it will throw an error

maxChunkSize

The maximum side length of a sub-cuboid

Constructors

Link copied to clipboard

Functions

Link copied to clipboard
public Unit collect(BlockPos pos, BlockState state, ItemStack tool, List<ItemStack> droppedStacks)
public Unit collect(ServerWorld world, BlockPos pos, BlockState state, BlockEntity blockEntity, Entity destroyer, ItemStack tool)

Stores the dropped items of a broken block.

Link copied to clipboard
public Unit dropAll(ServerWorld world)

Drops all collected items into the world.