import { Block, BlockComponentTypes, BlockInventoryComponent } from "@minecraft/server"

export class BlockComponents {
    /**
     * @param {Block} block 
     * @returns {BlockInventoryComponent}
     */
    static getInventory(block) {
        try {
            return block.getComponent(BlockComponentTypes.Inventory)
        } catch {
            return undefined
        }
    }

}