Files
minecraft-bedrock-json-schemas/source/behavior/trading/trading.json

190 lines
6.8 KiB
JSON
Raw Normal View History

2021-06-06 10:07:19 +00:00
{
2021-11-20 11:26:35 +01:00
"$schema": "http://json-schema.org/draft-07/schema",
2021-06-06 10:07:19 +00:00
"$id": "blockception.minecraft.behavior.trading",
"type": "object",
"additionalProperties": false,
2022-07-22 19:41:04 +02:00
"description": "UNDOCUMENTED.",
2021-07-01 11:35:53 +02:00
"$comment": "UNDOCUMENTED",
2021-06-09 11:12:18 +02:00
"title": "Trading",
2021-06-06 10:07:19 +00:00
"examples": [
{
"tiers": [
{
"trades": [ { "wants": [ { "item": "minecraft:coal:0", "quantity": { "min": 16, "max": 24 } } ], "gives": [ { "item": "minecraft:emerald" } ] } ]
2021-06-06 10:07:19 +00:00
}
]
}
],
"definitions": {
"Item": {
"title": "Item",
"oneOf": [
{ "type": "string" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"item": { "type": "string", "title": "Item Identifier" },
"price_multiplier": { "type": "number", "title": "Price Multiplier" },
2022-04-20 12:29:44 +02:00
"functions": { "$ref": "#/definitions/Functions" },
"biomes": {
"title": "Biomes",
2022-07-22 19:41:04 +02:00
"description": "UNDOCUMENTED.",
2022-04-20 12:29:44 +02:00
"type": "array",
"items": {
2024-07-23 21:26:23 +02:00
"$ref": "../../general/vanilla/biome.json"
2022-04-20 12:29:44 +02:00
}
},
2021-06-06 10:07:19 +00:00
"quantity": {
"title": "Quantity",
"oneOf": [
{ "type": "integer", "minimum": 1, "title": "Amount" },
{
"type": "object",
"additionalProperties": false,
"required": [ "min", "max" ],
2021-06-06 10:07:19 +00:00
"properties": {
"min": { "type": "integer", "minimum": 1, "title": "Minimum" },
"max": { "type": "integer", "minimum": 1, "title": "Maximum" }
}
}
]
2022-04-20 12:29:44 +02:00
}
2021-06-06 10:07:19 +00:00
}
}
]
},
"Functions": {
"title": "Functions",
"type": "array",
"items": { "type": "object", "required": [ "function" ], "$ref": "../loot_tables/functions.json" }
2021-06-06 10:07:19 +00:00
},
"TradeArray": {
"type": "array",
"title": "Trades",
"items": {
"additionalProperties": false,
"type": "object",
"title": "Trade",
"required": [ "wants", "gives" ],
2021-06-06 10:07:19 +00:00
"properties": {
"gives": {
"type": "array",
"title": "Gives",
"items": {
"title": "Give",
"oneOf": [
{ "type": "string" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"item": { "type": "string", "title": "Item Identifier" },
"quantity": {
"title": "Quantity",
"oneOf": [
{ "type": "integer", "minimum": 1, "title": "Amount" },
{
"type": "object",
"additionalProperties": false,
"required": [ "min", "max" ],
2021-06-06 10:07:19 +00:00
"properties": {
"min": { "type": "integer", "minimum": 1, "title": "Minimum" },
"max": { "type": "integer", "minimum": 1, "title": "Maximum" }
}
}
]
},
"functions": { "$ref": "#/definitions/Functions" },
2021-07-01 11:35:53 +02:00
"choice": {
"title": "Choice",
2022-07-22 19:41:04 +02:00
"description": "UNDOCUMENTED.",
2021-07-01 11:35:53 +02:00
"$comment": "UNDOCUMENTED",
"type": "array",
"items": { "$ref": "#/definitions/Item" }
}
2021-06-06 10:07:19 +00:00
}
}
]
}
},
"wants": {
"type": "array",
"title": "Wants",
"items": {
"title": "Want",
"oneOf": [
{ "type": "string" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"item": { "type": "string", "title": "Item Identifier" },
"quantity": {
"title": "Quantity",
"oneOf": [
{ "type": "integer", "minimum": 1, "title": "Amount" },
{
"type": "object",
"additionalProperties": false,
"required": [ "min", "max" ],
2021-06-06 10:07:19 +00:00
"properties": {
"min": { "type": "integer", "minimum": 1, "title": "Minimum" },
"max": { "type": "integer", "minimum": 1, "title": "Maximum" }
}
}
]
},
2022-07-22 19:41:04 +02:00
"price_multiplier": { "title": "Price Multiplier", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "type": "number" },
2021-06-06 10:07:19 +00:00
"functions": { "$ref": "#/definitions/Functions" },
2021-07-01 11:35:53 +02:00
"choice": {
"title": "Choice",
2022-07-22 19:41:04 +02:00
"description": "UNDOCUMENTED.",
2021-07-01 11:35:53 +02:00
"$comment": "UNDOCUMENTED",
"type": "array",
"items": { "$ref": "#/definitions/Item" }
}
2021-06-06 10:07:19 +00:00
}
}
]
}
},
"trader_exp": { "type": "integer", "title": "Trader Experience" },
"max_uses": { "type": "integer", "title": "Maximum Uses" },
2022-06-07 22:08:25 +02:00
"weight": { "type": "integer", "title": "Weight" },
2021-06-06 10:07:19 +00:00
"reward_exp": { "type": "boolean", "title": "Reward Experience" }
}
}
}
},
"properties": {
2022-04-20 12:26:00 +02:00
"format_version": { "$ref": "../../general/format_version.json" },
2021-06-06 10:07:19 +00:00
"tiers": {
"type": "array",
"title": "Tiers",
2022-07-22 19:41:04 +02:00
"description": "A collection of tiers.",
2021-06-06 10:07:19 +00:00
"items": {
"additionalProperties": false,
"type": "object",
"title": "Tier",
"required": [ "total_exp_required", "groups" ],
2021-06-06 10:07:19 +00:00
"properties": {
"trades": { "$ref": "#/definitions/TradeArray" },
"total_exp_required": { "title": "Total Experience Required", "type": "integer" },
"groups": {
"type": "array",
"title": "Groups",
2022-07-22 19:41:04 +02:00
"description": "A collection of groups.",
2021-06-06 10:07:19 +00:00
"items": {
"type": "object",
"title": "Group",
"additionalProperties": false,
"properties": { "num_to_select": { "title": "Number To Select", "type": "integer" }, "trades": { "$ref": "#/definitions/TradeArray" } }
}
}
}
}
}
2021-06-09 11:12:18 +02:00
}
2021-06-06 10:07:19 +00:00
}