Wiki 9Minecraft Villager Trade Tables Mod Wiki

Villager Trade Tables Mod — Guide

Professions and Careers

In Minecraft, villagers are organized into a hierarchy: Professions (the broad category, like Priest) and Careers (the specific subtype, like Cleric).

Adding Professions

To create a brand new profession, you define a profession object in your JSON. This requires a unique ID and can optionally include a custom texture for the villager's skin.

Adding Careers

Careers are nested within professions. A single profession can have multiple careers. For example, the vanilla 'Smith' profession includes the 'Armorer', 'Weapon Smith', and 'Tool Smith' careers.

Adding Career Levels

Trades are assigned to specific Career Levels. As a player trades with a villager, the villager gains experience and levels up, unlocking the trades associated with the next level. This mod allows you to define exactly which trades appear at levels 1 through 5.

Customizing Trades

The core of the mod is the Offers array, which contains individual trade definitions. Each trade uses an action key to determine how it interacts with the villager's existing trade pool.

Adding Trades

To add a new trade, use the "action": "add" command. You must specify the CareerLevel and the items involved in the transaction.

Removing Trades

To remove a vanilla or modded trade, use "action": "remove". This is particularly useful for balancing modpacks by removing overpowered trades or items that bypass progression.

Property Description
action Either add or remove.
CareerLevel The level (1-5) at which this trade becomes available.
buy The primary item the villager wants from the player.
buyB (Optional) A second item the villager wants.
sell The item the villager gives to the player.
Chance (Optional) The decimal probability (0.0 to 1.0) of this trade being selected.

Trade Syntax Guide

Items in the JSON files are defined as objects. This allows for high precision when specifying trade requirements.

Item Object Properties

  • id: The registry name of the item (e.g., minecraft:emerald).
  • Damage: The metadata or durability value of the item.
  • Count: The number of items. This can be a single integer or a range object.
  • NBT: A string representation of the item's NBT data (e.g., "{display:{Name:\"Legendary Sword\"}}").

Quantity Ranges

Instead of a fixed number, you can provide a range to randomize the trade costs:

"Count": { "min": 1, "max": 5 }

Example Trade JSON

Below is an example of a trade that adds a custom transaction to the Cleric career:

{
 "Profession": "minecraft:cleric",
 "Career": "cleric",
 "Offers": [
 {
 "action": "add",
 "CareerLevel": 1,
 "buy": { "id": "minecraft:rotten_flesh", "Count": 32 },
 "sell": { "id": "minecraft:emerald", "Count": 1 }
 }
 ]
}

Included Content

The mod comes pre-packaged with several new villager careers to demonstrate its capabilities. These villagers use custom robes and offer specialized trades.

New Careers

  • Brewer (Yellow Robe): Focuses on potion ingredients, glass bottles, and brewed potions.
  • Redstoner (Red Robe): Trades in redstone components, machinery, and ores.
  • Tinkerer (Blue Robe): Offers various utility items and materials.
  • Necromancer (Purple Robe): A new career for the Priest profession that trades in undead-related drops and dark artifacts.

Client-Only Resources

When creating custom professions, the names and textures are not automatically generated. These are handled via standard Minecraft Resource Packs.

Localization

To give your custom profession or career a proper name in the trading UI, you must add entries to a lang file within a resource pack: * entity.Villager.[profession_name].name * entity.Villager.[profession_name].[career_name].name

Textures

Villager textures are located in assets/minecraft/textures/entity/villager/. If you define a custom texture in your JSON file, the mod will look for that file path within your active resource packs.