Might be possible to give the block an NBT tag that allows pointing it to a different shop file too.
There are also ways to expand on this:
- Having a way to spawn in a vending machine that draws from a different pool than the default. Every crafted vending machine used by normal players would draw from the default pool, but it would be possible with commands or something to make a vending machine draw its items from a different pool. For example, it would be possible to add a Pixelmon TCG pack vending machine in a world where most vending machines are drink vending machines. Perhaps this could be done with commands, or all available pools could be cycled through with debug stick.
- Making it possible to configure the different colors of vending machines to have different pools if we want. For example, with datapacks you may be able to make all red vending machines sell Poke Balls, all blue vending machines sell drinks, all yellow vending machines sell healing items, and so on.
Similar to applying a loot table to a container:
you could apply a shopkeeper file to a Vending Machine:
(The shop file root folder the tag checks relative to should be data/<namespace>/npcs/shopkeepers/, staying consistent with other applications of namespaced paths. Loot tables for example use data/<namespace>/loot_tables/ as their root.)