
# -> If stick count != 10 then return
execute unless items entity @s contents stick[count=10] run \
    return fail

# -> If item is not in an empty space then return
execute unless block ~ ~ ~ air run \
    return fail

# -> If item is not on the ground then return
execute if block ~ ~-0.01 ~ air run \
    return fail

# -> Place unlit campfire
setblock ~ ~ ~ campfire[lit=false]

# -> Advancement
advancement grant @a[distance=..10] only overly_realistic:advancements/stone_age/lit_and_let_light

# -> Create campfire marker
#execute align xyz run \
    summon marker ~0.5 ~0.5 ~0.5 {Tags:["OverlyRealistic.CampfireBlock"]}

# -> Remove sticks
kill @s