跳转至

Trade Table

文档版本:1.21.0.24

Defines this entity's ability to trade with players.

架构

trade_table:
{
  boolean "convert_trades_economy" : opt
  string "display_name" : opt
  boolean "new_screen" : opt
  boolean "persist_trades" : opt
  string "table" : opt
}
convert_trades_economyboolean
Determines when the mob transforms, if the trades should be converted when the new mob has a economy_trade_table. When the trades are converted, the mob will generate a new trade list with their new trade table, but then it will try to convert any of the same trades over to have the same enchantments and user data. For example, if the original has a Emerald to Enchanted Iron Sword (Sharpness 1), and the new trade also has an Emerald for Enchanted Iron Sword, then the enchantment will be Sharpness 1.
display_namestring
Name to be displayed while trading with this entity.
new_screenboolean
Used to determine if trading with entity opens the new trade screen.
persist_tradesboolean
Determines if the trades should persist when the mob transforms. This makes it so that the next time the mob is transformed to something with a trade_table or economy_trade_table, then it keeps their trades.
tablestring
File path relative to the resource pack root for this entity's trades.