
# --> Interaction checks

# -> If the player is shifting then remove items
execute if score @s OverlyRealistic.PredicateValue.IsSneaking matches 1 run \
    return run \
        scoreboard players set #or.mortar_interaction_type OverlyRealistic.General.ArbitraryData 1

# -> If player does not have any items on him then return
execute unless items entity @s weapon.mainhand * run \
    return fail

# -> Store currently used item
item replace entity 00000001-0000-002b-0000-00010000002b contents from entity @s weapon.mainhand overly_realistic:items/set_1_count

# -> Use pestle
execute if items entity @s weapon.mainhand stick run \
    return run \
        scoreboard players set #or.mortar_interaction_type OverlyRealistic.General.ArbitraryData 2

# -> Add items
scoreboard players set #or.mortar_interaction_type OverlyRealistic.General.ArbitraryData 3
