1. Wiki
  2. /Entities
  3. /minecraft:trade_table

minecraft:trade_table

Don't want to write this by hand? GodCraft sets minecraft:trade_table for you with a switch.Get GodCraft

Overview

minecraft:trade_table is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets players trade with the entity using a trade list file. Use it for custom merchants.

Fields

FieldTypeDefaultDescription
display_namestring""Name shown at the top of the trade screen.
tablestring""Path to the trade file, starting from the behavior pack folder.
new_screenbooleanfalseIf true, the newer trade screen is used.
persist_tradesbooleanfalseIf true, the trades are kept if the mob later transforms into another trading mob.
convert_trades_economybooleanfalseIf true, when the mob transforms into one with an economy trade table, matching trades are carried over to the new list.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:trade_table": {
    "display_name": "",
    "table": "",
    "new_screen": false,
    "persist_trades": false,
    "convert_trades_economy": false
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more