Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Links
Tags
Creators
Details
A Fabric mod that lets villagers automatically execute their trades using items from chests or barrels placed directly around them.
Set up an input chest above the villager and an output chest beneath, configure which trades you want active via a simple GUI, and let the villager handle the rest while it works at its workstation.
Features
- Hands-free trading — villagers automatically execute their offers as long as they have buy items in the input chest and space in the output chest
- Per-villager configuration — shift + right-click any villager to open the config screen
- Priority ordering — drag trades up/down so high-value offers go first
- Toggle individual trades — enable only the trades you want, ignore the rest
- Natural restock — uses Minecraft's built-in trade limits (each offer caps at its
MaxUses, then restocks when the villager visits its workstation) - Works during villager work hours — trades only fire while the villager is on duty (in-game day, ticks 2000–9000), respecting vanilla AI
Installation
Requirements:
- Minecraft 26.3, 26.2 or 1.21.11 — pick the file for your version on the Versions tab. New Minecraft releases are built and tested automatically as soon as Fabric API supports them.
- Fabric Loader and Fabric API for that version
- Java 25 for Minecraft 26.x (the official launcher brings it), Java 21 for 1.21.11
Drop villager-auto-trade-<version>.jar into your mods/ folder alongside Fabric API. Works on both client and dedicated server — for multiplayer, every player needs the mod installed (the configuration GUI is client-side).
How to use
Setup per villager
[Chest or Barrel] ← directly above the villager (input)
[Villager] ← standing on the output chest
[Chest or Barrel] ← directly below the villager (output)
The villager itself stands on top of the output chest. Place an input chest one block above the villager's head. Use a fence cell or similar to keep the villager from wandering off.
Configure trades
- Fill the input chest with the items the villager wants to buy (e.g. emeralds, paper, coal)
- Shift + right-click the villager to open the config screen
- Tick the trades you want auto-executed
- Use the ↑ / ↓ arrows to set priority (top of the list runs first)
- Click Save
Watch it run
During work hours, the villager will execute one trade per second per enabled offer, as long as items and output space are available. Once an offer reaches its max uses (red MAXED badge), the mod skips it and moves on. The villager restocks automatically by working at its workstation.
Restocking needs the workstation within reach: vanilla only restocks a villager that stands within about 1.7 blocks of its claimed workstation. Put the workstation right next to the villager's cell, or its offers stay MAXED.
If a villager does nothing, check the server log: the mod writes one line per villager when something is missing (no trades, no chest above or below), and one line when it is solved.
Config screen
The screen is opened with shift + right-click on a villager. It shows:
- Auto Trade Enabled — global on/off toggle for that villager
- List of trades — checkbox to enable, ↑↓ buttons for priority, MAXED indicator for offers that are out of stock
- Save / Cancel — save writes to the villager's NBT data, persisting across restarts
Compatibility
- Works with all villager professions (librarian, farmer, weaponsmith, etc.) and any workstation type
- Compatible with chests, trapped chests, barrels, and any block entity that implements
Inventory - No conflicts known with common QoL mods
License
MIT — feel free to use, modify, or redistribute.
Credits
Made by Dziko3000.


