Can't you use `settings.sourceBlock.contains(blockPresent)`? Then you can just use 

    if (!settings.sourceBlock.contains(world.getTypeId(x + block.x, y + block.y, z + block.z)) {