
# -> 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

# -> Mortar
execute if data storage overly_realistic:temp_values \
    {temp_preparation_plate_items:\
        [\
            {id:"minecraft:flint"},{id:"minecraft:flint"},{id:"minecraft:flint"},\
            {id:"minecraft:clay_ball"},{id:"minecraft:clay_ball"},{id:"minecraft:clay_ball"}\
        ]\
    } run \
        return run \
            function overly_realistic:general/custom_blocks/preparation_plate/interactions/recipe_interactions/create_mortar

# -> Basket
execute if data storage overly_realistic:temp_values \
    {temp_preparation_plate_items:\
        [\
            {id:"minecraft:mud_bricks"},{id:"minecraft:mud_bricks"},{id:"minecraft:mud_bricks"}\
        ]\
    } run \
        return run \
            function overly_realistic:general/custom_blocks/preparation_plate/interactions/recipe_interactions/create_basket

# -> 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 [Leaf litter]
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_leaf_litter

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

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

# -> 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 bucket
execute if data storage overly_realistic:temp_values \
    {temp_preparation_plate_items:\
        [\
            {id:"minecraft:stick"},{id:"minecraft:stick"},{id:"minecraft:stick"}\
        ]\
    } run \
        return run \
            function overly_realistic:general/custom_blocks/preparation_plate/interactions/recipe_interactions/create_wooden_bucket

# -> 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
