跳转至

Economy Trade Table

文档版本:1.21.0.24

Defines this entity's ability to trade with players.

架构

economy_trade_table:
{
  boolean "convert_trades_economy" : opt
  array "cured_discount" : opt
  {
    integer "0..0" : opt
    integer "1..1" : opt
  }
  string "display_name" : opt
  integer "hero_demand_discount" : opt
  array "max_cured_discount" : opt
  {
    integer "0..0" : opt
    integer "1..1" : opt
  }
  integer "max_nearby_cured_discount" : opt
  integer "nearby_cured_discount" : opt
  boolean "new_screen" : opt
  boolean "persist_trades" : opt
  boolean "show_trade_screen" : opt
  string "table" : opt
  boolean "use_legacy_price_formula" : 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.
cured_discountarray
How much should the discount be modified by when the player has cured the Zombie Villager. Can be specified as a pair of numbers (low-tier trade discount and high-tier trade discount)
cured_discount
0..0integer
Minimum.
1..1integer
Maximum.
display_namestring
Name to be displayed while trading with this entity.
hero_demand_discountinteger
Used in legacy prices to determine how much should Demand be modified by when the player has the Hero of the Village mob effect.
max_cured_discountarray
The Maximum the discount can be modified by when the player has cured the Zombie Villager. Can be specified as a pair of numbers (low-tier trade discount and high-tier trade discount)
max_cured_discount
0..0integer
Minimum.
1..1integer
Maximum.
max_nearby_cured_discountinteger
The Maximum the discount can be modified by when the player has cured a nearby Zombie Villager.
nearby_cured_discountinteger
How much should the discount be modified by when the player has cured a nearby Zombie Villager.
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.
show_trade_screenboolean
Show an in game trade screen when interacting with the mob.
tablestring
File path relative to the resource pack root for this entity's trades.
use_legacy_price_formulaboolean
Determines whether the legacy formula is used to determines the trade prices.