minecraft:light_dampening for you with a switch.Get GodCraftOverview
minecraft:light_dampening is a block component: it goes in the components object of a custom block. Sets how much light the block soaks up as light passes through, from 0 to 15. Use 0 for clear blocks like glass and 15 to stop light completely.
Example
Inside the components object of BP/blocks/<name>.json (values are the defaults or placeholders):
BP/blocks/<name>.json
{
"minecraft:light_dampening": {}
}