Every command that does stuff with items allows you to choose which item via the <slot> argument.
To check that a player is holding mangoes in their hotbar, you would use the following command:
/goop testinventory %player% 0-8 m CONSUMABLE MANGO
Suppose you wanted to check that the player has put mangoes in the Smoothie Maker, in the container's thirteenth slot.
/goop testinventory %player% c13 m CONSUMABLE MANGO
Use c13 to target the container.
Slot 13 is just the normal inventory.
Similarily, if you want to change the ladders into acacia boats (for fun), you would use the following command:
/goop nbt setMaterial %player% c0,c8,c9,c17 ACACIA_BOAT
A few slots have become Acacia Boats.
This only works while the player has the container open --- if they close their inventory, the c keyword will no longer do anything.
By default, this will consume all mangoes in the player's inventory (not searching inside shulker boxes):
/goop consumeitem %player% m CONSUMABLE MANGO all
However, if you wanted to target mangoes in the container the player has open (instead of their inventory):
/goop consumeitem %player% m CONSUMABLE MANGO all C
And if you want to consume mangoes inside shulker boxes in the observed container:
/goop consumeitem %player% m CONSUMABLE MANGO all H
Remember that if you want to target both inside and outside containers, you must put both letters in there:
/goop consumeitem %player% m CONSUMABLE MANGO all CH
I recommend calling /goop mythicmobs runSkillAs for all sorts of sound and visual effects apart from the actual function of the slot. If you want to know which slot was clicked to trigger the mythic skill, you will want to use the following placeholders:
<goop.slot.provided> or %goop_slot_provided%
Will stand for the clicked slot without the location where it was clicked.... suppose they click container slot #18, then the placeholder will return '18' without the corresponding c to indicate it was the observed container. This might make it ambiguous between the inventory and container, as they both will return only the slot number. This placeholder always gives you only the number of the slot.
<goop.slot.provided.full> or %goop_slot_provided_full%
Will stand for the entire slot, unambiguous between inventory and container, clicking slot #18 in the inventory returns the number 18 but clicking it in the container returns the slot c18. This placeholder always gives you the complete, unambiguous slot.
If you dont disable drag inventory actions with /goop containers config options, this gets more complicated, as players may put items in several slots at the same time! Anyway, in that case, the placeholders will return a comma-separated list of the slots clicked.
This can be complicated more if you enable the option 'drag overflow' which means that, if the player also interacted with their inventory with this drag action, the inventory slots will be included as well. By default this is disabled, but if you really want to include inventory slots from drag operations in these placeholders, you will have to enable that option.