export class Utils {

    static getNeighborBlocks(block){
        const dimension = block.dimension;
        const location = block.location;
        const neighborBlocks = [];
        const checkLocations = [
            {x:location.x, y:location.y, z:location.z - 1},
            {x:location.x + 1, y:location.y, z:location.z},
            {x:location.x, y:location.y, z:location.z + 1},
            {x:location.x - 1, y:location.y, z:location.z},
            {x:location.x, y:location.y + 1, z:location.z},
            {x:location.x, y:location.y - 1, z:location.z}
        ]
    
        checkLocations.forEach(loc => {
            const checkedBlock = dimension.getBlock(loc);
            if(checkedBlock != null || checkedBlock != undefined) neighborBlocks.push(checkedBlock);
        });
    
        return neighborBlocks;
    }

    static isSolidBlock(block){
        
    }

}