ModsFinder

MerchantJS

by MerrySnow

With MerchantJS, a KubeJS script can define additional villager trades and open a custom trading screen for any entity, including pigs.

ForgeClient and serverGNU General Public License v3.0 onlyOpen source1.20.1 – 1.20.6

What it does

MerchantJS is a Forge addon for KubeJS that extends the trading system. Scripts use it to initiate trades anywhere in the world, so an entity that cannot normally trade can offer custom trades through a customizable trading screen. Setting maxUses to 0 makes a trade appear unavailable, which lets scripts enable and disable offers selectively, a common way to gate trades behind stage-based progression.

The mod focuses on creating additional trades quickly rather than replacing vanilla trading, which already includes many mechanics. Event hooks can combine MerchantJS with dynamic trade control, and an event fires after a trade occurs, including for vanilla trades, so scripts can trigger further actions once a player has traded. Restocking is checked at an interval whenever a trade window is opened.

Features such as restocking by experience, demand, or price fluctuation are not built in, so a script author must implement them. Stock information and other trade-related data must be stored by the script, and KubeJS persistentData is suited to that purpose. Offers are defined anew each time openMerchant is called, and a refresh of trade data is needed only when the script calls for one. Servers that run it need every player to install it too. Files are published for Forge, with 1.0.0 for 1.20.6 as the latest file, and the code is open source under the GNU General Public License v3.0 only.

Key features

  1. Custom trades for any entity

    Scripts open a trading screen for entities such as pigs, with offers defined in code, not limited to villagers.

  2. Selective trade control

    A max-uses value of 0 hides an offer as unavailable, so trades can be enabled or disabled per stage.

  3. Post-trade events

    An event fires after a trade completes, including vanilla trades, to start additional actions.

  4. Dynamic trade control

    MerchantJS works together with event-driven scripts that change which trades are offered at a given time.

Compatibility

Latest build for each game version and loader.

1.20.61.0.0
1.20.51.0.0
1.20.41.0.0
1.20.31.0.0
1.20.21.0.0
1.20.11.0.0
ReleaseBetaAlphaNot available

Only full game releases are shown. This mod publishes no snapshot builds.

Questions

Does MerchantJS need KubeJS?

Yes. MerchantJS is an addon for KubeJS, which must be installed alongside it on Forge.

Does the server need MerchantJS?

Yes. The server and every player need the mod installed.

Which game versions does MerchantJS support?

Files cover six release versions, with 1.0.0 for 1.20.6 as the latest release, and only Forge is supported.

In the catalog

MerchantJS is one of 2,072 Economy mods on ModsFinder, and one of 1,010 Economy mods for Forge. 11,154 mods support Minecraft 1.20.6.

More from MerrySnow

All projects

Similar mods

What the author says

This mod is an addon for KubeJS, expanding its functionality in the trading system. This mod allows you to initiate trades anywhere — trade with pigs, with End Stone, with Enchanted Golden Apples, or even out of thin air!
MerrySnow, on the Modrinth page

Official listing

Owner
MerrySnow
Published
2025-10-26
Updated on Modrinth
2025-10-26
Facts verified
2026-10-15

Tags