
# -> Cache items data into storage
data modify storage overly_realistic:temp_values temp_preparation_plate_items set from entity @s data.PlateItems

# --> Check recipes

# -> Stone hatchet
execute if data storage overly_realistic:temp_values \
    {temp_preparation_plate_items:\
        [\
            {id:"minecraft:stick"},{id:"minecraft:rabbit_hide"},{id:"minecraft:vine"},\
            {id:"minecraft:flint",components:{"minecraft:custom_data":{IsSharpenedFlint:1b}}}\
        ]\
    } run \
        return run \
            function overly_realistic:general/custom_blocks/preparation_plate/interactions/recipe_interactions/create_stone_hatchet

# -> Spear
execute if data storage overly_realistic:temp_values \
    {temp_preparation_plate_items:\
        [\
            {id:"minecraft:flint"},\
            {id:"minecraft:stick","components":{"minecraft:custom_data":{IsSharpenedStick:1b}}}\
        ]\
    } run \
        return run \
            function overly_realistic:general/custom_blocks/preparation_plate/interactions/recipe_interactions/create_spear

# -> Dry tinder
execute if data storage overly_realistic:temp_values \
    {temp_preparation_plate_items:\
        [\
            {id:"minecraft:leaf_litter"},{id:"minecraft:leaf_litter"},{id:"minecraft:leaf_litter"},\
            {id:"minecraft:leaf_litter"},{id:"minecraft:leaf_litter"},{id:"minecraft:leaf_litter"},\
            {id:"minecraft:leaf_litter"},{id:"minecraft:vine"},{id:"minecraft:vine"}\
        ]\
    } run \
        return run \
            function overly_realistic:general/custom_blocks/preparation_plate/interactions/recipe_interactions/create_dry_tinder

# -> Short bow
execute if data storage overly_realistic:temp_values \
    {temp_preparation_plate_items:\
        [\
            {id:"minecraft:stick"},{id:"minecraft:stick"},{id:"minecraft:stick"},\
            {id:"minecraft:vine"},{id:"minecraft:vine"},{id:"minecraft:vine"},\
            {id:"minecraft:flint"}\
        ]\
    } run \
        return run \
            function overly_realistic:general/custom_blocks/preparation_plate/interactions/recipe_interactions/create_short_bow

# -> Wooden Arrow
execute if data storage overly_realistic:temp_values \
    {temp_preparation_plate_items:\
        [\
            {id:"minecraft:vine"},\
            {id:"minecraft:stick","components":{"minecraft:custom_data":{IsSharpenedStick:1b}}}\
        ]\
    } run \
        return run \
            function overly_realistic:general/custom_blocks/preparation_plate/interactions/recipe_interactions/create_wooden_arrow
