Villagers restock buy trades when you use up a sell trade, and vice versa.
Works server-side and in single player.
This mod replaces vanilla's villager restocking mechanic. Villagers will no longer be limited to a few restocks a day.
Instead, every time you lock out a villager trade, if the newly locked trade was a buy trade, the villager will restock all of their sell trades. Likewise, if the newly locked trade was a sell trade, the villager will restock all of their buy trades.
A sell trade is any trade that gives the player emeralds. All other trades are buy trades.
In addition, every time the villager levels up, or if all of a villager's trades ever become locked out, they will restock all of their trades. This is to ensure a villager will never be stuck in a state where you can't trade with them at all.
The rationale for this mod is that it eliminates the need for having lots of villagers with the same trades, and as a result should reduce lag. Villagers are fairly laggy, so having lots of them can greatly affect performance.
In addition to reducing lag, this new restock mechanic:
• eliminates tedious waiting for villagers to restock
• makes you use more than one of a villager's trades, adding a little depth to trading and encouraging more/diverse farms
• makes the villager economy make a little more sense since it can't be completely one-sided buying or selling
Configuration
Options will use their default values if Cloth Config is absent.
If Cloth Config is present, options can be configured either through Mod Menu or by editing
config/economical_villager_trading.json
in your instance folder (.minecraft/
by default for the vanilla launcher). • Villager trade adjust balance; default -1
Affects how quickly villager trades adjust due to usage. Higher numbers make it change slower, -1 uses vanilla adjustments. A value of 100 or greater completely disables this kind of adjustment.
• Enable reputation price adjustments; default true
Allow trade adjustments for things like hurting villagers, curing zombie villagers and just frequent trades.
• Villager XP multiplier; default 1
Multiplier applied to xp granted by villagers.
• Enable villager levelup while trading; default true
Normally villagers won't level up while you're trading with them. This option allows them to level up.
Compatibility
Some considerations:
• If a villager has only "buy trades" or only "sell trades", those trades will only restock once all of them have been exhausted.
• As of 1.3.0, trades are considered "buy trades" if they give an item tagged with "economical_villager_trading:buy_trade_currencies"
, which by default is only emeralds. All other trades are considered "sell trades".
"economical_villager_trading:buy_trade_currencies"
or "c:villager_currencies"
(which "economical_villager_trading:buy_trade_currencies"
contains). Modded villager currencies may also be added to Economical Villager Trading upon request.
• Prior to 1.3.0, only emeralds could define a "buy trade".
Translations
You can help translate Economical Villager Trading on Crowdin.
This mod is only for Fabric (works on Quilt, too!) and I won't be porting it to Forge. The license is MIT, however, so anyone else is free to port it.
I'd appreciate links back to this page if you port or otherwise modify this project, but links aren't required.