Villager Trade Generator
Create custom villager summon commands with trades.
How to use
Configure the villager and its trades. Custom trade NBT is a Java Edition feature and is not interchangeable with Bedrock commands.
Basic fallback generator
A simplified form is available while the main generator loads. It does not include every setting in the full tool.
Output
Villager trade generator notes
Villager trade data is version-sensitive. Start with one simple trade, confirm it works, then add more offers.
Examples and checks
- Confirm buy and sell item IDs.
- Set a sensible maximum use count.
- Long villager commands are easier to run from a command block.
A complete one-trade shop (Java 1.20.5 and later)
/summon minecraft:villager ~ ~1 ~ {VillagerData:{profession:"minecraft:librarian",level:5,type:"minecraft:plains"},Offers:{Recipes:[{buy:{id:"minecraft:emerald",count:3},sell:{id:"minecraft:diamond",count:1},maxUses:9999}]},NoAI:1b,Invulnerable:1b,PersistenceRequired:1b}
| Part | Meaning |
|---|---|
VillagerData | Profession, level (5 = master, so trades do not change) and biome look |
buy / sell | What the player pays and receives. Add buyB for a second cost item |
maxUses | How many times the trade can be used before it locks |
NoAI, Invulnerable, PersistenceRequired | The shopkeeper stands still, cannot be killed and never despawns |
Add more trades by putting more {buy:…,sell:…} entries inside Recipes, separated by commas. On 1.20.4 and earlier, item counts are written Count:3b with a capital C.
Step-by-step guides
Related guides
Separate spawning from custom trades
Begin with /summon minecraft:villager ~ ~1 ~. That only summons a villager; it does not create custom offers. In Java Edition, custom trade data uses the version-dependent villager Offers structure. Bedrock Edition's ordinary summon command cannot accept the same Java trade NBT.
Build one offer before a full shop
- Choose a supported Java version.
- Specify the cost item and count, then the item delivered.
- Generate a single trade, inspect the output and test in a separate world.
- Only then add multiple offers or advanced item data.
If you selected Bedrock, do not expect Java custom trade commands to work unchanged. A normal summon and custom shop behavior are different requirements.
These are explanatory examples, not a claim that every Minecraft release has been tested in-game.