
# -> Untag player
tag @s remove OverlyRealistic.Player.IsUsingHuiItem

# -> Reset HUI time old
scoreboard players set @s OverlyRealistic.Player.UsingHuiTime_Old 0

# -> If HUI item is in the offhand then return and operate
execute if items entity @s weapon.offhand *[custom_data~{or_hold_use_interaction:1b}] \
    unless items entity @s weapon.mainhand *[custom_data~{or_hold_use_interaction:1b}] run \
        return run \
            function overly_realistic:players/items/multipurpose/hold_down_use_interaction/hui_used_from_offhand

# -> Set hand data
scoreboard players set #or.player_use_hui_hand OverlyRealistic.General.ArbitraryData 1

# --> Item detection

# -> Spears
execute if items entity @s weapon.mainhand *[custom_data~{or_tool_type:"spear"}] run \
    return run \
        function overly_realistic:players/misc/spear/throw_spear
