createBlockItem

open fun createBlockItem(blockId: Key): ItemStack?(source)

Creates a new stack with a single item placing the block with blockId.


abstract fun createBlockItem(blockId: Key, amount: Int): ItemStack?(source)

Creates a new stack of the item placing the block with blockId. The caller owns the returned stack. Some blocks, like fire, can't be placed by an item.

Return

the stack, or null if the block has no item or the ID is unknown.

Parameters

amount

Amount of items. It is kept within 1 and the maximum stack size of the item.