execute if block ~ ~ ~ minecraft:spruce_wood[axis=x] run scoreboard players set @s bw_block 1584
execute if block ~ ~ ~ minecraft:spruce_wood[axis=y] run scoreboard players set @s bw_block 1585
execute if block ~ ~ ~ minecraft:spruce_wood[axis=z] run scoreboard players set @s bw_block 1586