
# -> Increase strip log time
scoreboard players add @s OverlyRealistic.Player.LogStripTime 1

# -> If strip log time >= 20 then play sound and reset time
execute if score @s OverlyRealistic.Player.LogStripTime matches 10.. run \
    function overly_realistic:players/stone_hatchet_strip/reset_strip_time

# -> If RNG fails then return
execute unless score @s OverlyRealistic.Player.StoneHatchetUses matches 10.. \
    unless predicate overly_realistic:world/campfire/light_campfire_rng run \
        return fail

# -> Reset stone hatchet uses
scoreboard players reset @s OverlyRealistic.Player.StoneHatchetUses

# -> Advancement
advancement grant @s only overly_realistic:advancements/stone_age/all_bark_no_bite

# -> Strip log
execute summon item_display run \
    function overly_realistic:players/stone_hatchet_strip/strip_log