
# -> Reset interaction type
scoreboard players set #or.cooking_board_interaction_type OverlyRealistic.General.ArbitraryData 0

# -> Operate on player
execute on target run \
    function overly_realistic:general/custom_blocks/cooking_board/player_interacted_with_cooking_board

# --> Interaction types

# -> Drop items (1)
execute if score #or.cooking_board_interaction_type OverlyRealistic.General.ArbitraryData matches 1 run \
    return run \
        function overly_realistic:general/custom_blocks/cooking_board/interaction_types/cooking_board_drop_items

# -> Place base food (2)
execute if score #or.cooking_board_interaction_type OverlyRealistic.General.ArbitraryData matches 2 \
    unless entity @s[tag=OverlyRealistic.Block.CookingBoard_HasBaseFood] \
    align xyz run \
        return run \
            function overly_realistic:general/custom_blocks/cooking_board/interaction_types/cooking_board_place_food

# -> Place base food (2)
execute if score #or.cooking_board_interaction_type OverlyRealistic.General.ArbitraryData matches 3 \
    if entity @s[tag=OverlyRealistic.Block.CookingBoard_HasBaseFood] run \
        return run \
            function overly_realistic:general/custom_blocks/cooking_board/interaction_types/cooking_board_use_knife
