minecraft:trade_table for you with a switch.Get GodCraftOverview
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
| Field | Type | Default | Description |
|---|---|---|---|
display_name | string | "" | Name shown at the top of the trade screen. |
table | string | "" | Path to the trade file, starting from the behavior pack folder. |
new_screen | boolean | false | If true, the newer trade screen is used. |
persist_trades | boolean | false | If true, the trades are kept if the mob later transforms into another trading mob. |
convert_trades_economy | boolean | false | If 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
}
}