execute as @e[predicate=survivalplus:item/raw_meat,predicate=survivalplus:cooking_pot] store result score @s itemcount run data get entity @s Item.count
execute as @e[predicate=survivalplus:item/ingredient,predicate=survivalplus:cooking_pot] store result score @s itemcount run data get entity @s Item.count
execute as @e[predicate=survivalplus:item/raw_meat,predicate=survivalplus:cooking_pot] at @s if score @s itemcount = @n[predicate=survivalplus:cooking_pot,predicate=survivalplus:item/ingredient,distance=...5] itemcount run tag @n[predicate=survivalplus:cooking_pot,predicate=survivalplus:item/ingredient,distance=...5] add cooking
execute as @e[predicate=survivalplus:item/raw_meat,predicate=survivalplus:cooking_pot] at @s if score @s itemcount = @n[predicate=survivalplus:cooking_pot,predicate=survivalplus:item/ingredient,distance=...5] itemcount run tag @s add cooking
execute as @e[predicate=survivalplus:item/raw_meat,predicate=survivalplus:cooking_pot] at @s if score @s itemcount = @n[predicate=survivalplus:cooking_pot,predicate=survivalplus:item/ingredient,distance=...5] itemcount if entity @e[type=item,predicate=survivalplus:cooking_pot,nbt={Item:{id:"minecraft:milk_bucket",count:1}},distance=...5] run function survivalplus:tools/food/sort_ingredient