Block.drops

Get the dropped items as a slot array.

class Block
drops

Parameters

world World

the world where the block has been broken

player Player

the player who broke the block, can be null (e.g. explosion, fire...)

item Item

item used to break the block, is null if player is null or the player broke the block with his hand

Return Value

Type: Slot[]

a slot array with the dropped items

Meta