execute if block ~ ~ ~ minecraft:comparator[facing=north] run scoreboard players set @s bw_block 1016
execute if block ~ ~ ~ minecraft:comparator[facing=east] run scoreboard players set @s bw_block 1017
execute if block ~ ~ ~ minecraft:comparator[facing=south] run scoreboard players set @s bw_block 1018
execute if block ~ ~ ~ minecraft:comparator[facing=west] run scoreboard players set @s bw_block 1019