#shoutout to simpleflips
execute if entity @s[tag=dirt] run setblock ~ ~ ~ dirt
execute if entity @s[tag=grass_block] run setblock ~ ~ ~ grass_block
execute if entity @s[tag=melon] run setblock ~ ~ ~ melon
execute if entity @s[tag=pumpkin] run setblock ~ ~ ~ pumpkin
execute if entity @s[tag=slime_block] run setblock ~ ~ ~ slime_block
execute if entity @s[tag=honey_block] run setblock ~ ~ ~ honey_block
execute if entity @s[tag=piston] run setblock ~ ~ ~ piston[facing=up]
execute if entity @s[tag=oak_planks] run setblock ~ ~ ~ oak_planks
execute if entity @s[tag=ice] run setblock ~ ~ ~ ice
execute if entity @s[tag=packed_ice] run setblock ~ ~ ~ packed_ice
execute if entity @s[tag=gravel] run setblock ~ ~ ~ gravel

execute if entity @s[tag=white_wool] run setblock ~ ~ ~ white_wool
execute if entity @s[tag=black_wool] run setblock ~ ~ ~ black_wool

execute if entity @s[tag=oak_leaves] run setblock ~ ~ ~ oak_leaves[persistent=true]
execute if entity @s[tag=acacia_leaves] run setblock ~ ~ ~ acacia_leaves[persistent=true]

execute if entity @s[tag=barrel_z] run setblock ~ ~ ~ barrel[facing=south]
execute if entity @s[tag=barrel_y] run setblock ~ ~ ~ barrel[facing=up]
execute if entity @s[tag=barrel_x] run setblock ~ ~ ~ barrel[facing=west]

execute if entity @s[tag=spruce_fence_gate] run setblock ~ ~ ~ spruce_fence_gate[facing=south]
execute if entity @s[tag=birch_fence_gate] run setblock ~ ~ ~ birch_fence_gate[facing=south]
execute if entity @s[tag=jungle_fence_gate] run setblock ~ ~ ~ jungle_fence_gate[facing=south]
execute if entity @s[tag=acacia_fence_gate] run setblock ~ ~ ~ acacia_fence_gate[facing=south]
execute if entity @s[tag=dark_oak_fence_gate] run setblock ~ ~ ~ dark_oak_fence_gate[facing=south]

execute if entity @s[tag=dark_oak_fence_gate] run scoreboard players set global hitCone 1

execute if entity @s[tag=prismarine_wall] run setblock ~ ~ ~ prismarine_wall
execute if entity @s[tag=sandstone_wall,tag=!log_flip] run setblock ~ ~ ~ sandstone_wall
execute if entity @s[tag=sandstone_wall,tag=log_flip] run setblock ~ ~ ~ diorite_wall
execute if entity @s[tag=diorite_wall,tag=!log_flip] run setblock ~ ~ ~ diorite_wall
execute if entity @s[tag=diorite_wall,tag=log_flip] run setblock ~ ~ ~ sandstone_wall
execute if entity @s[tag=polished_blackstone_wall] run setblock ~ ~ ~ polished_blackstone_wall
execute if entity @s[tag=red_nether_brick_wall] run setblock ~ ~ ~ red_nether_brick_wall
execute if entity @s[tag=end_stone_brick_wall,tag=!log_flip] run setblock ~ ~ ~ end_stone_brick_wall
execute if entity @s[tag=end_stone_brick_wall,tag=log_flip] run setblock ~ ~ ~ blackstone_wall
execute if entity @s[tag=blackstone_wall,tag=!log_flip] run setblock ~ ~ ~ blackstone_wall
execute if entity @s[tag=blackstone_wall,tag=log_flip] run setblock ~ ~ ~ end_stone_brick_wall
execute if entity @s[tag=polished_blackstone_brick_wall] run setblock ~ ~ ~ polished_blackstone_brick_wall

execute if entity @s[tag=linked_block] if block ~ ~-1 ~ stonecutter run function bd:movement/object/log_cut

execute at @s run kill @e[limit=1,sort=nearest,type=falling_block,tag=fake_block]

#make block receptors update (important for ice blocks)
execute if score global checkForWin matches ..0 run scoreboard players set global checkForWin 2
#one of our testers assumed they lost a level when an ice block didn't auto update the win state after getting pushed

kill @s