A fun little mod that lets players buy a random (or fixed) set of 7 items from a vending machine.
This mod works in two modes.
1) A random vending machine spawns randomly in Villages! It will contain a random selection of minecraft and modded items each day.
2) A fixed vending machine with preset selected items in it for scenario map building which is placed by map designers.
Ready to Go
The defaults allow any normal player to add Vending Machines without needing configuration. They are reasonable values and exclude game breaking items from vending machines.
Default Vending machines appearing randomly in villages. Each morning they restock with 7 random different items.
Common items sell for 1 emerald each. You can buy up to 8 of the same item before it runs out.
Uncommon items sell for 16 emeralds each. You can buy up to 4 of the same item.
Rare items sell for 32 emeralds each. You can buy up to 2 of the same item.
Epic items sell for 64 emeralds You can buy one item.
The Vending Machines restock with a new selection of 7 random items each morning.
And.. there are plentiful configuration options for mod pack designers and map makers.
The configuration file, which is a server config, is found in serverconfig for the saved world (e.g. saves/New World/serverconfig) and is called vm-server.toml.
The configuration file, now is a common config, is found in the config folder and is called vm-common.toml. You can also use this command in the game /config showfile vm COMMON then click the provided link to edit it, but you might have to restart the game, depending on OS and editor used or unlucky, for the settings to take effect.
Fixed Vending Machines
Map designers can set up a fixed vending machines with up to 7 set items and place them on the map. Excellent for Post Apocalyptic maps!
Then, they can change the configuration file to a different set of 7 items and place those vending machines on the map (must open them after placing for it to load the items and remain that way).
So a map designer could have food vending machines, potion vending machines, etc.
The default currency is emeralds. You can configure it to any item: emeralds, diamonds, eggs, shulker boxes, silver coins, etc.
You can configure the cost and limit of items.
Common items cost 1 currency units and players can buy up to 8 items. .
Uncommon items cost 16 currency units and players can buy up to 4 items.
Rare item items cost 32 currency units and players can buy up to 2 items.
Epic items cost 64 currency units and players can only buy up to 1 items.
If you set the price for a category to 0 currency units then they will not be offered.
You can now set all items from a mod to a given rarity for pricing/cost by doing "modid:*=3", this would set all items from "modid" to Epic.
Mod Include And Exclude lists.
The include list is handled first, the exclude list is handled second.
Include Mod Lists
You may include all mods by putting a "*". (default)
You may include only minecraft by adding "minecraft".
You may include only specific mods by putting their names.
Exclude Mod Lists
You may exclude all items from a mod.
For example: You can include all items from a mod by mod and then exclude a few items you don't want vending machines to sell.
These control creative tab groups inclusion or exclusion.
Include Group Lists
These include specific tabs from the creative menu
The default is include all tabs.
Exclude Group Lists
These exclude specific tabs from the creative menu. The default is "!" which means to exclude any items not on any creative tab.
Example: "!;decorations" excludes "any items not on a tab; and any items on the decoration tab"
Valid group names are: tabs: building_blocks, decorations, redstone, transportation, misc, food, tools, combat, brewing
You can use Include and Exclude Item lists to change what items are in Vending Machines.
Include Item Lists
This list will still be filtered by the other lists, so you have to check and remove any conflicts.
So you can use this if you only want to pick randomly from a smaller set of items instead of specifying a large exclude list.
Exclude Item Lists
You may exclude specific items from minecraft or a mod.
However! "Operator Only" or "Game Master Block" items like Command Blocks, Structure Blocks, etc. will not be sold except when set up by the map developer in a fixed item vending machine.
Fixed Machine List
A list of up to 7 items for fixed Vending Machines placed the next time you run minecraft. You may define a new fixed machine each time you run minecraft.
So you could configure a food vending machine- run minecraft and place several food vending machines.
Then you could configure a drink vending machine- run minecraft and place several drink vending machines.
And so on.
Here's an example configuration sample for 1.16.x:
#Use fixed items
UseFixedItems = true
FixedItems = "minecraft:iron_chest;minecraft:iron_leggings;minecraft:iron_sword;minecraft:bow;minecraft:air;minecraft:air;minecraft:air"
In later versions the config uses a list of strings instead of a single string with the semi-colon separator.
If you misspell an entry, or put in too few items, the slots will be set to "minecraft:air".
It now supports an optional expanded format, if the rarity system doesn't fit your needs. For example, if you wanted to sell 4 honey bottles for 8 coal (10 times), you would enter this for one of the fields:
You can also specify nbt for the items, like
It is important to escape any double quotes inside the nbt like in this example, otherwise the game can crash (out of my control).
If this option is turned on then it requires a diamond pickaxe with silk touch to get the vending machine otherwise you get either some iron ingots or nothing.
Note: Vending Machines will allow you "win" minecraft in superflat worlds (eventually!) since they are a source of some otherwise unavailable items.
Vending Machine is Supported by bernardo7480 thru January 31, 2023! It's available on alternative mod loaders due to his generous support. Thank you Bernardo!
You can join us on our Discord Server at the link below.
Like this Mod?
Save Your Pets: Instead of dying immediately, pets fall down wounded. You have a while to save them with bandages or golden bandages.
Enameled Armor: Cover your Diamond Armor with colored enamel and control whether the enchantment glow is on or off.
Nasty Mobs: Six Smarter Skeletons with custom AI, abilities, completely configurable.
Happy Trails: Easily Configure movement on your server (or single person game) to be 1 to 11 times faster or slower on almost any solid block!
Easy Redstone Extras: Tools to reduce redstone annoyance and make it more fun.
Regrowth: Animals eat grass and promote regrowth. Villagers improve their villages.
Beekeeper: A new villager who buys and sells bee related products including Bee Pollen and Royal Jelly custom foods!
Vending Machine: A vending machine which restocks with 7 random* items every morning. (*or Fixed by Map Designers)
Harder Branch Mining: Tools to make branch mining more difficult in various ways to encourage caving.
Villagers Respawn: Villagers who have a bed will respawn at them when they die.
Poor Golems: Hey Buddy, can you spare an ingot? Control over how often and how many iron ingots iron golems drop.