
# -> Remove interaction data
data remove entity @s interaction

# -> If there already is 10 sticks then return
execute if score @s OverlyRealistic.General.ArbitraryData matches 10.. run \
    return fail

# -> Add to stick amount and store value
execute store result storage overly_realistic:temp_values generic_value_0 int 1 run \
    scoreboard players add @s OverlyRealistic.General.ArbitraryData 1

# -> Create stick
function overly_realistic:general/custom_blocks/dry_tinder/interactions/create_stick_entity with storage overly_realistic:temp_values

# -> Set success
scoreboard players set #or.global OverlyRealistic.General.ArbitraryData 1

# -> Attach sticks
ride @n[type=item_display,tag=OverlyRealistic.Block.DryTinder_Item_TempItem,distance=..0.5] mount @n[type=block_display,tag=OverlyRealistic.Block.DryTinder,distance=..0.5]

# -> Untag attached item
execute as @n[type=block_display,tag=OverlyRealistic.Block.DryTinder,distance=..0.5] \
    on passengers run \
        tag @s remove OverlyRealistic.Block.DryTinder_Item_TempItem
