
# -> Intelligence gain RNG
execute if predicate overly_realistic:player/misc/intelligence_gain_rare_rng run \
    function overly_realistic:players/intelligence/add_1_intelligence

# -> Particle
execute at @s \
    anchored eyes run \
        particle item{item:"flint"} ^ ^-0.25 ^0.75 0.1 0.1 0.1 0.001 5 normal @a

# -> Sound
playsound minecraft:block.calcite.break block @a ~0.5 ~0.5 ~0.5 0.4 2
playsound minecraft:block.tuff.break block @a ~0.5 ~0.5 ~0.5 0.4 0

# -> Reset player data
function overly_realistic:players/items/sharpened_flint/knapping/player_not_looking_at_rock

# -> Edit item
execute if items entity @s weapon.mainhand *[custom_data~{sharpened_flint_uses:0b}] run \
    return run \
        function overly_realistic:players/items/sharpened_flint/knapping/item_edit/use_0_edit
execute if items entity @s weapon.mainhand *[custom_data~{sharpened_flint_uses:1b}] run \
    return run \
        function overly_realistic:players/items/sharpened_flint/knapping/item_edit/use_1_edit
execute if items entity @s weapon.mainhand *[custom_data~{sharpened_flint_uses:2b}] run \
    return run \
        function overly_realistic:players/items/sharpened_flint/knapping/item_edit/use_2_edit
execute if items entity @s weapon.mainhand *[custom_data~{sharpened_flint_uses:3b}] run \
    function overly_realistic:players/items/sharpened_flint/knapping/item_edit/knap_item
