Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 132
    • Issues 132
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Wiki
    • Skills
    • Mechanics
  • AddTrade

Last edited by Lxlp Mar 05, 2025
Page history

AddTrade

Description

Changes the trades of a villager.
The villager will become a nitwit if it doesn't have any profession assigned when using this mechanic.

Attributes

Attribute Aliases Description Default
action mode, m The action to perform. Can be ADD, REMOVE,REPLACE ADD
slot s , index The slot to be selected for the action. Slot starts at 0, so if a villager has 3 trades, the middle trade would be slot 1 0
ingredient item, ingredient1, item1, i, i1 The first ingredient STONE
ingredient2 item2, i2 The second ingredient
result r The result item of the trade STONE
maxUses uses, u The uses of the trade
experienceReward expReward, exp, dropExp If the trade should drop experience false
villagerExp villExp, vexp The amount of experience to give to the villager upon successful trade 0
priceMultiplier multiplier The multiplier for the price when the player has made the villager angry 0
demand d The demand of the trade 1
specialPrice special The special price for when the villager is friendly to the player (player reputation or hero of the village effect) 1
ignoreDiscounts discounts If the discounts should be ignored false

Examples

TestVillager:
  Type: Villager
  Display: 'OwO'
  Skills:
  - addTrade{item=DIAMOND 1;item2=EMERALD 2;result=IRON_INGOT 3;expReward=True;villExp=999;multiplier=0} @self ~onDamaged
  - addTrade{action=REPLACE;slot=1;item=DIRT 1;item2=COAL 2;result=DIAMOND_BLOCK 3;expReward=True;villExp=999;multiplier=0} @self ~onSignal:rev

Aliases

  • setTrade
  • removeTrade
  • replaceTrade
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
Mythic Add-ons
Compatible Plugins
API Information
Config Files

Guides
  • Troubleshooting
  • FAQ / Common Issues
  • Examples
Packs

MythicScribe MythicScribe - VSCode Extension

Mobs
  • Mob Options
    • Display Options
  • Mob Levels
  • Mob Factions
  • Power Scaling
  • Damage Modifiers
  • Equipment
  • BossBar
  • Custom AI
  • Custom Kill Messages
  • Threat Tables
  • Immunity Tables
  • Templates
  • Vanilla Overrides
  • Extra: Disguises
  • Extra: ModelEngine

Skills
  • Mechanics
    • Mechanics by Tag
  • Targeters
    • Filters
  • Triggers
  • Conditions
    • In-line conditions
  • Metaskills
  • Placeholders
  • Variables

Items
  • Options
  • Attributes
  • Enchantments
  • Potions
  • Banner Layers
  • Firework

Drops & DropTables
  • Drops
  • DropTables
  • FancyDrops

Spawning
  • Spawners
  • Random Spawns

Stats
  • Custom Stat Options
  • Modifiers
  • Built in Stats

Other
  • Particles Types
  • Audience
  • Equipment Slots
  • Pins
Technical
  • Math
  • Item Matcher
  • Operations
    • Attribute Operations
    • Stats Modifiers
  • SkillTree
  • Advanced User Guides and Techniques