Compatibility
Minecraft: Java Edition
1.21.10
1.21.3–1.21.8
1.21–1.21.1
1.20.6
1.20.4
1.20–1.20.2
1.19.4
1.19–1.19.2
1.18.2
1.16.3–1.16.5
Platforms
Supported environments
Client and server
Links
Tags
Creators
Details
Licensed MIT
Published 16 hours ago
Updated 2 months ago
Vending Machine
A fun little mod that lets players buy a random (or fixed) set of 7 items from a vending machine.
The Basics
This mod operates in two distinct modes:
- Random Vending Machines: Spawn naturally in Villages. They contain a rotating stock of vanilla and modded items each Minecraft day.
- Fixed Vending Machines: Contain preset items designated by map makers for custom maps, adventure scenarios, or post-apocalyptic builds.
Ready to Go
Default configurations allow plug-and-play usage without any manual setup. They use balanced default pricing and automatically exclude game-breaking progression items.
- Village Spawns: Vending machines generate inside villages and restock every morning with 7 random items.
1 emerald each (Stock: up to 8 purchases)
16 emeralds each (Stock: up to 4 purchases)
32 emeralds each (Stock: up to 2 purchases)
64 emeralds each (Stock: 1 purchase)
Configuration Files
- Server Config (older/per-world): Located at
saves/<World_Name>/serverconfig/vm-server.toml. - Common Config: Located in the global
config/vm-common.toml. - In-Game Command: Run
/config showfile vm COMMONto open the file link directly from chat (a client or game restart may be required depending on your OS and editor).
Fixed Vending Machines
Map designers can configure fixed vending machines with up to 7 preset items:
- Set up the config with your desired 7 items.
- Load the game and place the vending machines in your world.
- Important: Open the vending machine inventory once after placing so it saves the data into the block instance.
- Update the config with a different item list (e.g., drinks, weapons, or food) to place another distinct machine type elsewhere.
Advanced Configuration & Spoilers
Currency & Rarity Cost Rules
Currency
The default currency is emeralds (minecraft:emerald). This can be configured to any item ID (diamonds, coins, shulker boxes, etc.).
Cost Defaults
(Limit: 8)
(Limit: 4)
(Limit: 2)
(Limit: 1)
- Setting a category price to
0disables items of that tier entirely.
Item Rarity Overrides
Assign specific items, mods, or tags to custom rarity tiers:
| Value | Tier | Badge |
|---|---|---|
0 |
Common | |
1 |
Uncommon | |
2 |
Rare | |
3 |
Epic |
- Mod-wide assignment:
"modid:*=3"(Sets all items from that mod to Epic). - Tag assignment (1.16.5, 1.18.2+):
"#minecraft:beds=1"(Sets all beds to Uncommon).
Custom Item Cost Format
Define single or dual-item payment requirements and custom purchase limits:
thing=itemA,countA[,itemB,countB][,maxUses]
This work is a fork of another work by MacTso
You can support him on patreon --> here <--


