execute if score @s bw_block matches 1543 run setblock -30000000 2 1610 minecraft:iron_trapdoor[half=bottom,facing=north,waterlogged=false]
execute if score @s bw_block matches 1543 run setblock -30000000 1 1610 minecraft:iron_trapdoor[half=bottom,facing=north,waterlogged=true]
execute if score @s bw_block matches 1544 run setblock -30000000 2 1610 minecraft:iron_trapdoor[half=bottom,facing=east,waterlogged=false]
execute if score @s bw_block matches 1544 run setblock -30000000 1 1610 minecraft:iron_trapdoor[half=bottom,facing=east,waterlogged=true]
execute if score @s bw_block matches 1545 run setblock -30000000 2 1610 minecraft:iron_trapdoor[half=bottom,facing=west,waterlogged=false]
execute if score @s bw_block matches 1545 run setblock -30000000 1 1610 minecraft:iron_trapdoor[half=bottom,facing=west,waterlogged=true]
execute if score @s bw_block matches 1546 run setblock -30000000 2 1610 minecraft:iron_trapdoor[half=bottom,facing=south,waterlogged=false]
execute if score @s bw_block matches 1546 run setblock -30000000 1 1610 minecraft:iron_trapdoor[half=bottom,facing=south,waterlogged=true]
execute if score @s bw_block matches 1547 run setblock -30000000 2 1610 minecraft:iron_trapdoor[half=top,facing=north,waterlogged=false]
execute if score @s bw_block matches 1547 run setblock -30000000 1 1610 minecraft:iron_trapdoor[half=top,facing=north,waterlogged=true]
execute if score @s bw_block matches 1548 run setblock -30000000 2 1610 minecraft:iron_trapdoor[half=top,facing=east,waterlogged=false]
execute if score @s bw_block matches 1548 run setblock -30000000 1 1610 minecraft:iron_trapdoor[half=top,facing=east,waterlogged=true]
execute if score @s bw_block matches 1549 run setblock -30000000 2 1610 minecraft:iron_trapdoor[half=top,facing=west,waterlogged=false]
execute if score @s bw_block matches 1549 run setblock -30000000 1 1610 minecraft:iron_trapdoor[half=top,facing=west,waterlogged=true]
execute if score @s bw_block matches 1550 run setblock -30000000 2 1610 minecraft:iron_trapdoor[half=top,facing=south,waterlogged=false]
execute if score @s bw_block matches 1550 run setblock -30000000 1 1610 minecraft:iron_trapdoor[half=top,facing=south,waterlogged=true]
function bw:waterstate/direction
execute if score @s bw_calc matches 1.. run playsound minecraft:block.metal.place block @s ~ ~ ~ 1 0.8