#advancement revoke @s only vb:technical/obtain_pie_potential_1
#advancement revoke @s only vb:technical/obtain_pie_potential_2

execute if items entity @s container.* minecraft:pumpkin_pie[!minecraft:custom_data] run advancement grant @s only vb:husbandry/bake_pie
execute if items entity @s container.* minecraft:poisonous_potato[minecraft:custom_data~{"vb.item.apple_pie":1b}] run advancement grant @s only vb:husbandry/bake_pie