
# -> If block below is a campfire, and the current block is not a campfire, then move downwards
execute unless block ~ ~ ~ #campfires \
    unless block ~ ~-1 ~ air \
    if block ~ ~-2 ~ campfire[lit=false] run \
        tp @s ~ ~-2 ~

# -> If block is inside a non-full block then try moving it up
execute at @s \
    unless block ~ ~ ~ #campfires[lit=false] run \
    return run \
        function overly_realistic:general/custom_blocks/fire_starter/fire_starter_break

# -> Attempt placing the block
execute at @s \
    align xyz \
    positioned ~0.5 ~0.5 ~0.5 run \
        function overly_realistic:general/custom_blocks/fire_starter/fire_starter_placed
