{
  "$id": "blockception.minecraft.behavior.entities.minecraft.economy_trade_table",
  "type": "object",
  "title": "Economy Trade Table",
  "additionalProperties": false,
  "description": "Defines this entity's ability to trade with players.",
  "required": [],
  "properties": {
    "convert_trades_economy": {
      "type": "boolean",
      "default": false,
      "description": "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.",
      "title": "Convert Trades Economy"
    },
    "cured_discount": {
      "type": "array",
      "default": [-5, -20],
      "description": "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)",
      "title": "Cured Discount",
      "items": [
        {
          "type": "integer",
          "title": "A",
          "description": "Minimum."
        },
        {
          "type": "integer",
          "title": "B",
          "description": "Maximum."
        }
      ]
    },
    "display_name": {
      "type": "string",
      "default": "",
      "description": "Name to be displayed while trading with this entity.",
      "title": "Display Name"
    },
    "hero_demand_discount": {
      "type": "integer",
      "default": -4,
      "description": "Used in legacy prices to determine how much should Demand be modified by when the player has the Hero of the Village mob effect.",
      "title": "Hero Demand Discount"
    },
    "max_cured_discount": {
      "type": "array",
      "default": [-25, -63],
      "description": "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)",
      "title": "Maximum Cured Discount",
      "items": [
        {
          "type": "integer",
          "title": "A",
          "description": "Minimum."
        },
        {
          "type": "integer",
          "title": "B",
          "description": "Maximum."
        }
      ]
    },
    "max_nearby_cured_discount": {
      "type": "integer",
      "default": -200,
      "description": "The Maximum the discount can be modified by when the player has cured a nearby Zombie Villager.",
      "title": "Maximum Nearby Cured Discount"
    },
    "nearby_cured_discount": {
      "type": "integer",
      "default": -25,
      "description": "How much should the discount be modified by when the player has cured a nearby Zombie Villager.",
      "title": "Nearby Cured Discount"
    },
    "new_screen": {
      "type": "boolean",
      "default": false,
      "description": "Used to determine if trading with entity opens the new trade screen.",
      "title": "New Screen"
    },
    "persist_trades": {
      "type": "boolean",
      "default": false,
      "description": "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.",
      "title": "Persist Trades"
    },
    "show_trade_screen": {
      "type": "boolean",
      "default": true,
      "description": "Show an in game trade screen when interacting with the mob.",
      "title": "Show Trade Screen"
    },
    "table": {
      "type": "string",
      "default": "",
      "description": "File path relative to the resource pack root for this entity's trades.",
      "title": "Table"
    },
    "use_legacy_price_formula": {
      "type": "boolean",
      "default": false,
      "description": "Determines whether the legacy formula is used to determines the trade prices.",
      "title": "Use Legacy Price Formula"
    }
  },
  "examples": [
    {
      "convert_trades_economy": false,
      "cured_discount": [],
      "display_name": "",
      "hero_demand_discount": -4,
      "max_cured_discount": [],
      "max_nearby_cured_discount": -200,
      "nearby_cured_discount": -25,
      "new_screen": false,
      "persist_trades": false,
      "show_trade_screen": true,
      "table": "",
      "use_legacy_price_formula": false
    }
  ]
}
