
# --> Interaction checks

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

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

# -> If player does not have any special items on him then return
execute if items entity @s weapon.mainhand poisonous_potato \
    unless function overly_realistic:general/custom_blocks/crucible/crucible_special_material_detect run \
        return fail

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

# -> Add material
scoreboard players set #or.crucible_interaction_type OverlyRealistic.General.ArbitraryData 2
