User avatar
By reiyooki
#214911 It would be wonderful to have the ability to configure the vending machine items and prices. This would allow servers to do some really neat things with them, rather than relegating them to a seldom-used decoration block.

User avatar
By SKyTheThunder
#214913 I believe there are plans to tie Vending Machines to their own shopkeeper file like the NPCs.
Might be possible to give the block an NBT tag that allows pointing it to a different shop file too.
User avatar
By 9Tales
#215639 I definitely think we should add the ability to edit the default list of items sold in vending machines with datapacks.

There are also ways to expand on this:
  1. 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.
  2. 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.
User avatar
By SKyTheThunder
#215644 Imo the most consistent would be to do it via an NBT tag, like Vanilla does for chest loot.

Similar to applying a loot table to a container:
minecraft:chest{LootTable:"<namespace>:<path/to/loot_table>"}
you could apply a shopkeeper file to a Vending Machine:
pixelmon:<color>_vending_machine{ShopFile:"<namespace>:<path/to/shopkeeper>"}

(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.)
JOIN THE TEAM