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

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

# -> If the player did not use any item then return
execute unless items entity 00000001-0000-002b-0000-00010000002b contents * run \
    return fail

# -> Place food
execute if items entity 00000001-0000-002b-0000-00010000002b contents #fishes run \
    return run \
        scoreboard players set #or.cooking_board_interaction_type OverlyRealistic.General.ArbitraryData 2

# -> Use knife
execute if items entity 00000001-0000-002b-0000-00010000002b contents *[custom_data~{or_tool_type:"knife"}] run \
    return run \
        scoreboard players set #or.cooking_board_interaction_type OverlyRealistic.General.ArbitraryData 3

# -> Use stone knife (NOTE: DEPRECATED, CHANGE IN FUTURE UPDATE)
execute if items entity 00000001-0000-002b-0000-00010000002b contents *[custom_data~{or_tool_material:"stone",or_tool_type:"sword"}] run \
    return run \
        scoreboard players set #or.cooking_board_interaction_type OverlyRealistic.General.ArbitraryData 3
