更新文档导航顺序,添加新页面和翻译内容
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
---
|
||||
title: 战利品、配方、交易
|
||||
nav_order: 11
|
||||
categories:
|
||||
- title: 基础
|
||||
color: blue
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,10 @@
|
||||
---
|
||||
title: Recipes
|
||||
category: Documentation
|
||||
title: 配方系统
|
||||
category: 文档
|
||||
nav_order: 3
|
||||
tags:
|
||||
- Stable
|
||||
- Last updated for Version 1.20.30
|
||||
- 稳定版本
|
||||
- 最后更新于1.20.30版本
|
||||
mentions:
|
||||
- Ciosciaa
|
||||
- SirLich
|
||||
@@ -14,21 +14,25 @@ mentions:
|
||||
- QuazChick
|
||||
---
|
||||
|
||||
Recipes are the means of handling several item transactions, namely those occurring in crafting tables, furnaces, campfires, and brewing stands.
|
||||
# 配方系统
|
||||
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
配方系统用于处理多种物品转换逻辑,包括工作台、熔炉、营火和酿造台的合成流程。
|
||||
|
||||

|
||||
|
||||
::: tip
|
||||
Anvil interactions are handled within an [item definition](/wiki/items/item-components), not via recipe files. Loom transactions are currently unavailable.
|
||||
铁砧交互通过[物品定义](/wiki/items/item-components)实现,而非配方文件。织布机交互当前暂不可用。
|
||||
:::
|
||||
|
||||
No experimental toggles are required to use recipes or any of their features.
|
||||
使用配方功能无需开启任何实验性选项。
|
||||
|
||||
### Registration
|
||||
## 注册方式
|
||||
|
||||
All recipes are stored in the `recipes` folder in the behavior pack root. The files can be named and organized under any folder hierarchy as desired.
|
||||
所有配方文件需存放在行为包根目录的`recipes`文件夹中,支持任意子目录结构和命名方式。
|
||||
|
||||
This arbitrary structure is used for the paths in this document:
|
||||
以下示例展示了本文档采用的目录结构:
|
||||
|
||||
<FolderView
|
||||
:paths="[
|
||||
@@ -41,10 +45,10 @@ This arbitrary structure is used for the paths in this document:
|
||||
]"
|
||||
/>
|
||||
|
||||
As an example, a "cold steel sword" might be crafted using the following [shaped recipe](#shaped-recipes):
|
||||
例如,可通过以下[有序配方](#有序配方)制作"寒钢剑":
|
||||
|
||||
<CodeHeader>BP/recipes/crafting/weapons/cold_steel_sword.json</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [BP/recipes/crafting/weapons/cold_steel_sword.json]
|
||||
{
|
||||
"format_version": "1.17.41",
|
||||
"minecraft:recipe_shaped": {
|
||||
@@ -77,211 +81,217 @@ As an example, a "cold steel sword" might be crafted using the following [shaped
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Shared Properties and Structures
|
||||
|
||||
### Format Version
|
||||
|
||||
The [format version](/wiki/guide/format-version) is intended to version the schema used for the body of a recipe. It is provided with the top-level `"format_version"` property.
|
||||
|
||||
<CodeHeader>#/</CodeHeader>
|
||||
```json
|
||||
"format_version": "1.17.41"
|
||||
```
|
||||
|
||||
In practice, the format version can be set to any value or even omitted.
|
||||
|
||||
::: warning
|
||||
It's strongly recommended to include a format version anyway, choosing a value that represents an actual Minecraft version to help future-proof the code. Consider using the current release version or last major release version.
|
||||
:::
|
||||
|
||||
### Description
|
||||
## 通用属性与结构
|
||||
|
||||
The `"description"` object, required within any recipe type, holds the identifier of a recipe.
|
||||
### 格式版本
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shaped/</CodeHeader>
|
||||
```json
|
||||
[格式版本](/wiki/guide/format-version)用于标识配方文件的架构版本,通过顶层`"format_version"`属性指定。
|
||||
|
||||
::: code-group
|
||||
```json [#/]
|
||||
"format_version": "1.17.41"
|
||||
```
|
||||
:::
|
||||
|
||||
实际使用中格式版本可设为任意值或省略。
|
||||
|
||||
::: warning
|
||||
强烈建议仍保留格式版本,并选择与当前Minecraft版本匹配的值以保证未来兼容性。推荐使用最新正式版或上一个主版本号。
|
||||
:::
|
||||
|
||||
### 描述信息
|
||||
|
||||
`"description"`对象是所有配方类型的必填项,用于声明配方唯一标识符。
|
||||
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shaped/]
|
||||
"description": {
|
||||
"identifier": "wiki:cold_steel_sword"
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
Its only child is the required `"identifier"` property, which is designed to uniquely identify a recipe across all packs applied to a world. There are no namespacing requirements for recipe identifiers except that no two full recipe identifiers in a single pack may match.
|
||||
其中必填的`"identifier"`属性用于在世界中所有行为包范围内唯一标识配方。单个包内不允许存在重复的完整配方ID。
|
||||
|
||||
::: warning
|
||||
It's strongly recommended to use a namespace. Namespaces are a standard in other add-on domains and assist in logically scoping the recipe to a pack, lessening possibilities of collisions for players wanting to use multiple behavior packs in their world.
|
||||
强烈建议使用命名空间。命名空间是附加组件领域的通用规范,有助于将配方逻辑归属到特定行为包,减少多包混用时发生冲突的可能性。
|
||||
:::
|
||||
|
||||
### Tags
|
||||
### 标签系统
|
||||
|
||||
Recipes are linked to crafting interfaces using the required `"tags"` array property, which must be placed within any recipe type. These tags will make the recipe be shared across different blocks that uses the `minecraft:crafting_table` component. When the recipe does not inlcude the `crafting_table` tag, or any vanilla tag, but a tag from your custom block, the recipe will only be shared to that custom block and not the crafting table/stonecutter/etc. At least one tag must be provided.
|
||||
通过必填的`"tags"`数组属性将配方与合成界面关联,该属性需置于任何配方类型中。这些标签会使配方在具有`minecraft:crafting_table`组件的不同方块间共享。若配方不包含`crafting_table`标签或任何原版标签,但包含自定义方块的标签,则该配方仅适用于该自定义方块而非工作台/切石机等。必须提供至少一个标签。
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shaped/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shaped/]
|
||||
"tags": ["crafting_table", "altar"]
|
||||
```
|
||||
|
||||
Vanilla interfaces are exposed to tags for each set of recipe types.
|
||||
|
||||
Crafting:
|
||||
|
||||
- `crafting_table`
|
||||
- `stonecutter`
|
||||
- `smithing_table`
|
||||
|
||||
:::
|
||||
warning Note that if you want to make a smithing recipe, you will need to use `<namespace>:netherite_ingot` for the second slot, though using a different identifier will not work. **This no longer works after 1.18.30**.
|
||||
:::
|
||||
|
||||
Cooking and Smelting:
|
||||
原版界面为各类配方类型开放了对应标签:
|
||||
|
||||
- `furnace`
|
||||
- `blast_furnace`
|
||||
- `smoker`
|
||||
- `campfire`
|
||||
- `soul_campfire`
|
||||
合成类:
|
||||
- `crafting_table`
|
||||
- `stonecutter`
|
||||
- `smithing_table`
|
||||
|
||||
Brewing:
|
||||
::: warning
|
||||
注意:若要制作锻造台配方,第二个槽位必须使用`<命名空间>:netherite_ingot`,使用其他标识符将无效。**此特性在1.18.30后已失效**。
|
||||
:::
|
||||
|
||||
- `brewing_stand`
|
||||
熔炼类:
|
||||
- `furnace`
|
||||
- `blast_furnace`
|
||||
- `smoker`
|
||||
- `campfire`
|
||||
- `soul_campfire`
|
||||
|
||||
Education:
|
||||
酿造类:
|
||||
- `brewing_stand`
|
||||
|
||||
- `material_reducer`
|
||||
教育版:
|
||||
- `material_reducer`
|
||||
|
||||
::: tip
|
||||
Additionally, [custom crafting tables](/wiki/blocks/block-components#crafting-table) can declare a custom tag for crafting recipes to use. Custom cooking and smelting blocks and custom brewing stands are not currently available.
|
||||
::: tip
|
||||
此外,[自定义工作台](/wiki/blocks/block-components#crafting-table)可声明自定义标签供合成配方使用。目前不支持自定义熔炉和酿造台。
|
||||
:::
|
||||
|
||||
::: tip
|
||||
To effectively disable a recipe (useful for [overriding](#overrides) a prior recipe), set the tag array to `[""]`.
|
||||
要禁用配方(常用于[覆盖](#覆盖机制)已有配方),可将标签数组设为`[""]`。
|
||||
:::
|
||||
|
||||
### Recipe Unlocking
|
||||
Minecraft 1.20.30 added recipe unlocking to the game. In order to have your recipes use this function, you `manifest.json` must have a `min_engine_version` of 1.20.11 (1.20.30 is recommender). You also need to add the `unlock` array with its objects to your recipe.
|
||||
### 配方解锁
|
||||
Minecraft 1.20.30新增了配方解锁功能。要使用此功能,需确保`manifest.json`中的`min_engine_version`至少为1.20.11(推荐1.20.30),并在配方中添加`unlock`数组:
|
||||
```json
|
||||
"unlock": [
|
||||
{
|
||||
"item": "wiki:cold_steel" //item to unlock recipe
|
||||
"item": "wiki:cold_steel" //解锁配方所需物品
|
||||
},
|
||||
{
|
||||
"item": "minecraft:wool", //item to unlock recipe
|
||||
"item": "minecraft:wool", //解锁配方所需物品
|
||||
"data": 3
|
||||
},
|
||||
{
|
||||
"context": "PlayerInWater" //event to unlock recipe
|
||||
"context": "PlayerInWater" //解锁配方所需事件
|
||||
}
|
||||
]
|
||||
```
|
||||
Each object in this array contains `"item"` and this tells the recipe what item the player needs in their inventory in order for this recipe to be unlocked. It also accepts data values. `"context"` is used to determine what event unlocks this recipe. `"PlayerInWater"` will unlock this recipe when the player enters water. This is also the only known context for recipes.
|
||||
数组中每个对象的`"item"`字段表示玩家背包中需要存在的物品(支持数据值)。`"context"`字段表示触发解锁的事件,目前仅知`"PlayerInWater"`会在玩家入水时解锁配方。
|
||||
|
||||
### Item Descriptors
|
||||
### 物品描述符
|
||||
|
||||
Working with recipes entails referencing items across a number of properties. Items may be provided in one of two formats: a string reference or an item object. Both formats have means of handling data values, but only the item object may be used to specify a count for that item (usable in recipe outputs). For recipe inputs, if no data value is provided, items with any data value under that identifier will be usable for that input. The data value for an output defaults to `0` if one is not explicitly provided. Selecting recipe inputs by item tags is not supported.
|
||||
配方系统中涉及多种物品引用方式,支持两种格式:字符串引用和物品对象。两种格式均可处理数据值,但只有物品对象能指定数量(用于配方输出)。对于配方输入,若未指定数据值,则该标识符下任意数据值的物品都可用作输入。输出物品的数据值默认为`0`(若未显式指定)。不支持通过物品标签选择配方输入。
|
||||
|
||||
#### String Reference
|
||||
#### 字符串引用
|
||||
|
||||
Generally, a string reference is just the namespace and identifier combination for that item:
|
||||
基本格式为物品的命名空间加标识符组合:
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shapeless/ingredients/0</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shapeless/ingredients/0]
|
||||
"minecraft:planks"
|
||||
```
|
||||
:::
|
||||
|
||||
String references additionally support specification of a data value as a suffix:
|
||||
字符串引用还支持通过后缀指定数据值:
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shapeless/ingredients/0</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shapeless/ingredients/0]
|
||||
"minecraft:planks:2"
|
||||
```
|
||||
:::
|
||||
|
||||
#### Item Object
|
||||
#### 物品对象
|
||||
|
||||
The item object is a more explicit construct for referencing items.
|
||||
物品对象提供了更明确的物品引用结构。
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shapeless/ingredients/0</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shapeless/ingredients/0]
|
||||
{
|
||||
"item": "minecraft:planks",
|
||||
"data": 2,
|
||||
"count": 3
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
The required `"item"` property functions the same as the string reference format. Although an explicit data field is available, the data suffix string format is still supported in the `"item"` property. However, unlike the suffix form, `"data"` can accept Molang. The Molang here is evaluated once on world load, not per-crafting attempt. Variables cannot be used to pass data between properties in a recipe. Furthermore, the nature of input items cannot be queried. Currently, the only known usable query in the `"data"` property is `q.get_actor_info_id`, used to look up the ID of an entity's spawn egg by its identifier:
|
||||
必填的`"item"`属性功能同字符串引用。虽然提供了独立的数据字段,但`"item"`属性仍支持数据值后缀格式。不同于后缀形式,`"data"`可接受Molang表达式(该表达式仅在世界加载时计算一次,而非每次合成时计算)。无法通过变量在配方属性间传递数据。目前已知`"data"`属性中唯一可用的查询是`q.get_actor_info_id`,用于通过实体标识符获取其刷怪蛋ID:
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shapeless/result</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shapeless/result]
|
||||
{
|
||||
"item": "minecraft:spawn_egg",
|
||||
"data": "q.get_actor_info_id('minecraft:chicken')"
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
The optional integer `"count"` property may be used to stack items. It defaults to `1`. Currently, setting the count only functions in [crafting](#crafting) and [furnace](#heating) recipe outputs and [shapeless recipe ingredients](#ingredients). A provided count is ignored in other locations.
|
||||
可选的整数`"count"`属性用于堆叠物品,默认为`1`。当前仅在[合成](#合成)与[熔炼](#加热)配方输出及[无序配方原料](#原料)中有效,其他场景下会被忽略。
|
||||
|
||||
::: tip NOTE
|
||||
If a count greater than `1` is provided for an item that does not stack, an error will be thrown. There is no way to force single-return recipe outputs, like those in shapeless recipes or brewing mixes, to return multiple items in one transaction.
|
||||
::: tip 注意
|
||||
若对不可堆叠物品设置数量大于`1`,将抛出错误。无法强制单次返回多个合成输出(如无序配方或酿造混合产物)。
|
||||
:::
|
||||
|
||||
::: warning
|
||||
Despite having similarities to trade [table item descriptors](/wiki/loot/trade-tables#items), recipe item descriptors cannot use functions.
|
||||
尽管与交易[表物品描述符](/wiki/loot/trade-tables#items)相似,配方物品描述符不能使用函数。
|
||||
:::
|
||||
|
||||
#### Identifier Additions
|
||||
#### 特殊标识符
|
||||
|
||||
Additional identifiers not typically usable are available to recipes to describe basic potions.
|
||||
配方系统额外支持描述基础药水的特殊标识符。
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_brewing_mix/input</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_brewing_mix/input]
|
||||
"minecraft:potion_type:strength"
|
||||
```
|
||||
:::
|
||||
|
||||
These identifiers are not usable in the object notation, only the string notation. Variants are unavailable for splash and lingering potions. All such identifiers follow the format: <code>minecraft:potion_type:<em>potion_effect</em></code>, where <code><em>potion_effect</em></code> can be one of the following:
|
||||
这些标识符仅支持字符串格式,不支持对象格式,且无喷溅/滞留药水变种。所有此类标识符遵循格式:<code>minecraft:potion_type:<em>药水效果</em></code>,其中<code><em>药水效果</em></code>可为以下之一:
|
||||
|
||||
- `water`
|
||||
- `awkward`
|
||||
- `mundane`
|
||||
- `thick`
|
||||
- `healing`
|
||||
- `regeneration`
|
||||
- `swiftness`
|
||||
- `strength`
|
||||
- `harming`
|
||||
- `poison`
|
||||
- `slowness`
|
||||
- `weakness`
|
||||
- `water_breathing`
|
||||
- `fire_resistance`
|
||||
- `nightvision`
|
||||
- `invisibility`
|
||||
- `leaping`
|
||||
- `slow_falling`
|
||||
- `turtle_master`
|
||||
- `wither`
|
||||
- `water`(水)
|
||||
- `awkward`(粗制的)
|
||||
- `mundane`(平凡的)
|
||||
- `thick`(浓稠的)
|
||||
- `healing`(治疗)
|
||||
- `regeneration`(再生)
|
||||
- `swiftness`(迅捷)
|
||||
- `strength`(力量)
|
||||
- `harming`(伤害)
|
||||
- `poison`(剧毒)
|
||||
- `slowness`(缓慢)
|
||||
- `weakness`(虚弱)
|
||||
- `water_breathing`(水下呼吸)
|
||||
- `fire_resistance`(抗火)
|
||||
- `nightvision`(夜视)
|
||||
- `invisibility`(隐身)
|
||||
- `leaping`(跳跃)
|
||||
- `slow_falling`(缓降)
|
||||
- `turtle_master`(神龟)
|
||||
- `wither`(衰变)
|
||||
|
||||
Where supported, `long_` and `strong_` prefixes may be used to designate modified potions, such as `minecraft:potion_type:strong_poison`.
|
||||
支持添加`long_`和`strong_`前缀表示强化药水,如`minecraft:potion_type:strong_poison`。
|
||||
|
||||
## Crafting
|
||||
## 合成系统
|
||||
|
||||
Crafting operations instantly transform inputs to outputs using crafting grids. Two crafting recipe types are available: [shapeless recipes](#shapeless-recipes), whose inputs may be arranged in any way, and [shaped recipes](#shaped-recipes), used to define strict arrangements of inputs.
|
||||
Crafting recipes support both crafting tables and stonecutters:
|
||||
合成操作通过合成网格即时转换物品。支持两种配方类型:[无序配方](#无序配方)(原料可任意排列)和[有序配方](#有序配方)(需严格排列原料)。
|
||||
合成配方同时支持工作台和切石机:
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shapeless/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shapeless/]
|
||||
"tags": ["crafting_table", "stonecutter"]
|
||||
```
|
||||
:::
|
||||
|
||||
`"crafting_table"` applies to both vanilla crafting tables and the player 2 × 2 crafting grid in their inventory. There is currently no way to opt into one but not the other. Crafting recipes additionally support custom tags, linking recipes to a [crafting grid provided by a custom block](/wiki/blocks/block-components#crafting-table).
|
||||
`"crafting_table"`同时适用于原版工作台和玩家物品栏中的2×2合成网格,当前无法单独启用其中一种。合成配方还支持自定义标签,可将配方关联到[自定义方块提供的合成网格](/wiki/blocks/block-components#crafting-table)。
|
||||
|
||||
### Shapeless Recipes
|
||||
### 无序配方
|
||||
|
||||
Shapeless recipes simply bind a collection of inputs to a single output on a crafting grid.
|
||||
无序配方将原料集合与单个输出简单绑定。
|
||||
|
||||

|
||||
|
||||
<CodeHeader>BP/recipes/decorations/knobs/brass.json</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [BP/recipes/decorations/knobs/brass.json]
|
||||
{
|
||||
"format_version": "1.17.41",
|
||||
"minecraft:recipe_shapeless": {
|
||||
@@ -316,13 +326,14 @@ Shapeless recipes simply bind a collection of inputs to a single output on a cra
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
#### Ingredients
|
||||
#### 原料配置
|
||||
|
||||
The required `"ingredients"` array property lists the items required as inputs for the crafting recipe.
|
||||
必填的`"ingredients"`数组列出了合成所需的原料物品。
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shapeless/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shapeless/]
|
||||
"ingredients": [
|
||||
"wiki:brass",
|
||||
{
|
||||
@@ -331,29 +342,31 @@ The required `"ingredients"` array property lists the items required as inputs f
|
||||
}
|
||||
]
|
||||
```
|
||||
:::
|
||||
|
||||
Each entry is an [item descriptor](#item-descriptors). If an ingredient provides a count, that count must be expressed across multiple crafting grid slots. Using stacked items in a single grid slot to yield a product is unsupported. If the items required for crafting are available but the count of ingredients is greater than the crafting interface being used supports, the recipe will automatically be made unavailable in the recipe book.
|
||||
每项均为[物品描述符](#物品描述符)。若原料设置了数量,该数量必须通过多个合成网格槽位实现(单个槽位堆叠物品无法用于合成)。当所需物品存在但原料数量超过当前合成界面容量时,配方书会自动将该配方标记为不可用。
|
||||
|
||||
#### Shapeless Results
|
||||
#### 无序配方输出
|
||||
|
||||
Shapeless recipe outputs are expressed using the required `"result"` property and may be expressed as either an [item descriptor](#item-descriptors) or an array of a single item descriptor.
|
||||
通过必填的`"result"`属性声明输出,可以是[物品描述符](#物品描述符)或单物品描述符的数组。
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shapeless/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shapeless/]
|
||||
"result": {
|
||||
"item": "wiki:door_knob",
|
||||
"data": 3
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
### Shaped Recipes
|
||||
### 有序配方
|
||||
|
||||
Shaped recipes enforce that the ingredients used during crafting conform to a strict shape.
|
||||
有序配方要求原料必须按特定图案排列。
|
||||
|
||||

|
||||
|
||||
<CodeHeader>BP/recipes/covered_arch.json</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [BP/recipes/covered_arch.json]
|
||||
{
|
||||
"format_version": "1.17.41",
|
||||
"minecraft:recipe_shaped": {
|
||||
@@ -385,7 +398,6 @@ Shaped recipes enforce that the ingredients used during crafting conform to a st
|
||||
"result": [
|
||||
{
|
||||
"item": "wiki:covered_arch",
|
||||
|
||||
"count": 3
|
||||
},
|
||||
"wiki:crafting_scrap"
|
||||
@@ -393,70 +405,75 @@ Shaped recipes enforce that the ingredients used during crafting conform to a st
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
#### Patterns
|
||||
#### 图案定义
|
||||
|
||||
The required `"pattern"` array property establishes the shape used for the recipe.
|
||||
必填的`"pattern"`数组属性用于建立配方图案。
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shaped/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shaped/]
|
||||
"pattern": [
|
||||
"SSS",
|
||||
"I I",
|
||||
"I I"
|
||||
]
|
||||
```
|
||||
|
||||
Each entry in the array is a string representing a row in the crafting grid. Each character in each string represents a slot within that row. Spaces by default represent slots that should be empty.
|
||||
|
||||
Characters act as a shorthand to visually describe an item. Each distinct character is matched with a [key](#keys) that dictates what item should be present in that slot.
|
||||
|
||||
::: tip
|
||||
If the pattern is only comprised of spaces, empty crafting interfaces able to fit that pattern's size will constantly match the recipe. A player may retrieve an infinite amount of the crafting output, including immediately filling their inventory to the limit upon shift-retrieving the result.
|
||||
:::
|
||||
|
||||
##### Row Normalization
|
||||
数组每项代表合成网格的一行,字符串每个字符代表该行的槽位。默认空格表示该槽位需留空。
|
||||
|
||||
The pattern grid must be at most 3 × 3 but may be smaller. If string lengths are mismatched, Minecraft will automatically extend shorter strings, implying spaces in filled slots. The following two are equivalent:
|
||||
字符作为物品的视觉简写,每个独特字符需与[键定义](#键定义)匹配以指定对应槽位的物品。
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shaped/</CodeHeader>
|
||||
```json
|
||||
::: tip
|
||||
若图案全由空格组成,任何能容纳该图案尺寸的空合成界面都会持续匹配该配方。玩家可无限获取输出物品,包括通过Shift键一次性填满背包。
|
||||
:::
|
||||
|
||||
##### 行标准化
|
||||
|
||||
图案网格最大为3×3,可更小。若字符串长度不一致,Minecraft会自动补全较短字符串(用空格填充空缺槽位)。以下两组定义等效:
|
||||
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shaped/]
|
||||
"pattern": [
|
||||
"MA",
|
||||
"IFI",
|
||||
"M"
|
||||
]
|
||||
```
|
||||
:::
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shaped/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shaped/]
|
||||
"pattern": [
|
||||
"MA ",
|
||||
"IFI",
|
||||
"M "
|
||||
]
|
||||
```
|
||||
|
||||
::: tip NOTE
|
||||
Currently, no crafting grids, including those configurable from custom blocks, may be larger than 3 × 3. If the expressed pattern is unusable within the current crafting interface, the recipe will automatically be unavailable in the recipe book.
|
||||
:::
|
||||
|
||||
##### Grid Freedom
|
||||
::: tip 注意
|
||||
当前所有合成网格(包括自定义方块配置的)最大不超过3×3。若图案超出当前合成界面容量,配方书会自动将其标记为不可用。
|
||||
:::
|
||||
|
||||
Spaces are not automatically implied to fill in any remaining slots in the 3 × 3 space. If a provided pattern is smaller than the crafting grid being used, the pattern can be used anywhere so long as the structure and contents are maintained. As an example, consider the following pattern on a crafting table:
|
||||
##### 网格自由度
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shaped/</CodeHeader>
|
||||
```json
|
||||
空格不会自动填充3×3网格的剩余槽位。若提供的图案小于当前合成网格,只要保持结构和内容,图案可在网格任意位置使用。例如以下图案在工作台上的表现:
|
||||
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shaped/]
|
||||
"pattern": [
|
||||
"O"
|
||||
"OO"
|
||||
]
|
||||
```
|
||||
:::
|
||||
|
||||
The "L" shape isn't restricted to the upper-left corner of the crafting grid. Using a 3 × 3 grid as an example, the pattern would be usable with any of these configurations:
|
||||
"L"形图案不限左上角位置,在3×3网格中可能配置如下:
|
||||
|
||||
<Spoiler title="Possible Configurations">
|
||||
*Underscores represent empty slots.*
|
||||
<Spoiler title="可能的配置">
|
||||
*下划线代表空槽位*
|
||||
```txt
|
||||
O__
|
||||
OO_
|
||||
@@ -479,87 +496,91 @@ _OO
|
||||
```
|
||||
</Spoiler>
|
||||
|
||||
To restrict placements to a particular location, use explicit spaces, which enforce empty slots in certain locations. The following is only usable in the upper-left corner of a grid:
|
||||
要限制位置需显式使用空格强制某些槽位留空。以下图案仅能在网格左上角使用:
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shaped/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shaped/]
|
||||
"pattern": [
|
||||
"O "
|
||||
"OO "
|
||||
" "
|
||||
]
|
||||
```
|
||||
:::
|
||||
|
||||
##### Symmetry
|
||||
##### 对称性
|
||||
|
||||
All shaped recipes are innately horizontally symmetric:
|
||||
所有有序配方默认具有水平对称性:
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shaped/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shaped/]
|
||||
"pattern": [
|
||||
"Z "
|
||||
" Z "
|
||||
" Z"
|
||||
]
|
||||
```
|
||||
:::
|
||||
|
||||
The preceding recipe may also be used by a player as though it were set to:
|
||||
该配方也可被玩家视为以下形式使用:
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shaped/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shaped/]
|
||||
"pattern": [
|
||||
" Z"
|
||||
" Z "
|
||||
"Z "
|
||||
]
|
||||
```
|
||||
:::
|
||||
|
||||
#### Keys
|
||||
#### 键定义
|
||||
|
||||
Keys provide meaning to characters in a [pattern](#patterns), done via the required `"key"` object property, which maps key names to [item descriptors](#item-descriptors).
|
||||
通过必填的`"key"`对象属性将图案字符映射到[物品描述符](#物品描述符)。
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shaped/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shaped/]
|
||||
"key": {
|
||||
"S": "wiki:cloth",
|
||||
"I": "wiki:support"
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
Every key present in the pattern should be accounted for here. Keys names are case-sensitive. If an item supports multiple data values and no data value is provided, any item of that identifier will be usable for that key. Any `"count"` property present in an item descriptor is ignored and regarded as `1`; stacked items in a crafting grid slot are only consumable one at a time.
|
||||
图案中每个字符都需在此定义。键名区分大小写。若物品支持多数据值且未指定数据值,该标识符下任意数据值的物品都可用于该键。物品描述符中的`"count"`属性会被忽略并视为`1`;合成网格槽位中的堆叠物品每次仅消耗一个。
|
||||
|
||||
::: tip NOTE
|
||||
Any unicode character from `U+0020` to `U+07FF` may be used as a key name. If a key name has more than one character, only the first character is considered. Since spaces are by default used to signify empty slots on a grid and there's no way to re-designate a key for a blank slot, it's not recommended to use them as a key.
|
||||
::: tip 注意
|
||||
可使用`U+0020`到`U+07FF`间的任意Unicode字符作为键名。若键名超过一个字符,仅首字符有效。由于空格默认表示网格空槽且无法重新定义,不建议将其作为键。
|
||||
:::
|
||||
|
||||
::: warning
|
||||
If a character in the pattern is not present in the key map, it will be treated as though it were a space, a designated empty tile.
|
||||
若图案字符未在键映射中定义,将被视为空格(空槽位)。
|
||||
:::
|
||||
|
||||
### Recipe Unlocking
|
||||
Minecraft 1.20.30 added recipe unlocking to the game. In order to have your recipes use this function, you `manifest.json` must have a `min_engine_version` of 1.20.11 (1.20.30 is recommender). You also need to add the `unlock` array with its objects to your recipe.
|
||||
### 配方解锁
|
||||
Minecraft 1.20.30新增配方解锁功能。要使用此功能,需确保`manifest.json`中的`min_engine_version`至少为1.20.11(推荐1.20.30),并在配方中添加`unlock`数组:
|
||||
```json
|
||||
"unlock": [
|
||||
{
|
||||
"item": "wiki:cold_steel" //item to unlock recipe
|
||||
"item": "wiki:cold_steel" //解锁配方所需物品
|
||||
},
|
||||
{
|
||||
"item": "minecraft:wool", //item to unlock recipe
|
||||
"item": "minecraft:wool", //解锁配方所需物品
|
||||
"data": 3
|
||||
},
|
||||
{
|
||||
"context": "PlayerInWater" //event to unlock recipe
|
||||
"context": "PlayerInWater" //解锁配方所需事件
|
||||
}
|
||||
]
|
||||
```
|
||||
Each object in this array contains `"item"` and this tells the recipe what item the player needs in their inventory in order for this recipe to be unlocked. `"context"` is used to determine what event unlocks this recipe. `"PlayerInWater"` will unlock this recipe when the player enters water. This is also the only known context for recipes.
|
||||
数组中每个对象的`"item"`字段表示玩家背包中需要存在的物品。`"context"`字段表示触发解锁的事件,目前仅知`"PlayerInWater"`会在玩家入水时解锁配方。
|
||||
|
||||
#### Shaped Results
|
||||
#### 有序配方输出
|
||||
|
||||
Shaped crafting recipe outputs behave very similarly to their [shapeless counterparts](#shapeless-results). Unlike array results for shapeless recipes, however, shaped recipe result arrays may contain more than one [item descriptor](#item-descriptors).
|
||||
有序配方输出行为与[无序配方](#无序配方输出)相似。不同于无序配方的是,有序配方的输出数组可包含多个[物品描述符](#物品描述符)。
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shaped/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shaped/]
|
||||
"result": [
|
||||
{
|
||||
"item": "wiki:covered_arch",
|
||||
@@ -568,56 +589,59 @@ Shaped crafting recipe outputs behave very similarly to their [shapeless counter
|
||||
"wiki:crafting_scrap"
|
||||
]
|
||||
```
|
||||
The first entry in the array will be used as the visible output of the crafting block. All other values are automatically placed in the player's inventory upon removing the visible result from the output slot. There does not seem to be a limit on the number of items that may be returned from a crafting action.
|
||||
|
||||
::: tip NOTE
|
||||
Any items not able to fit in the player's inventory are instead placed in the input slots of the crafting table left-to-right and then top-to-bottom. Anything not able to fit there is then thrown from the player as though they had used the "Drop Item" action.
|
||||
:::
|
||||
|
||||
### Recipe Book
|
||||
数组首项将作为合成方块的可见输出,其余项会在玩家取走可见输出后自动放入背包。目前似乎没有对单次合成返回物品数量的限制。
|
||||
|
||||
The recipe book automatically indexes and displays available recipes to the player, intelligently accounting for [ingredient counts](#ingredients) in shapeless recipes or [pattern constraints](#patterns) in shaped recipes. When multiple recipes point to the same output, the recipe book uses its own unique prioritization system.
|
||||
::: tip 注意
|
||||
无法放入背包的物品会按从左到右、从上到下的顺序放回合成输入槽。若仍无法容纳,则会像玩家执行"丢弃物品"操作一样抛出。
|
||||
:::
|
||||
|
||||
When both recipes being compared are shapeless recipes, the following rules determine prioritization in order:
|
||||
### 配方书
|
||||
|
||||
- Lower ingredient count of the _first_ listed ingredient
|
||||
- More negative [priority](#priority)
|
||||
- Lower-valued identifier string
|
||||
配方书自动索引并显示可用配方,智能考虑无序配方的[原料数量](#原料配置)或有序配方的[图案限制](#图案定义)。当多个配方指向相同输出时,配方书使用独特优先级系统。
|
||||
|
||||
For shaped recipes, recipes with "lesser" identifiers, when compared as strings, are always prioritized.
|
||||
比较两个无序配方时,按以下顺序确定优先级:
|
||||
1. 第一个列出原料的较低数量
|
||||
2. 更小的[优先级值](#优先级)
|
||||
3. 字典序较小的标识符字符串
|
||||
|
||||
When comparing a shaped recipe to a shapeless recipe, the rules for comparing shapeless recipes are used; however, the interpreted count of ingredients for the shaped recipe is different from its actual ingredient count. Exactly how the ingredient count for a shaped recipe is determined is unknown.
|
||||
对于有序配方,字典序较小的标识符始终优先。
|
||||
|
||||
### Grouping
|
||||
比较有序与无序配方时,使用无序配方规则,但有序配方的原料数量计算方式不同(具体机制未知)。
|
||||
|
||||
This section is included informatively. Groups are present in crafting recipes in vanilla definitions, given with the optional `"group"` string property.
|
||||
### 分组系统
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shaped/</CodeHeader>
|
||||
```json
|
||||
本节为信息性说明。原版定义中的合成配方包含可选的`"group"`字符串属性。
|
||||
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shaped/]
|
||||
"group": "slingshots"
|
||||
```
|
||||
:::
|
||||
|
||||
It is currently unknown what, if anything, this property achieves. Presumably, it would be used with the [recipe book](#recipe-book). Neither using new custom groups nor reusing groups from vanilla definitions appear to achieve anything.
|
||||
目前未知该属性的具体作用(推测与[配方书](#配方书)相关)。使用自定义分组或复用原版分组均未观察到实际效果。
|
||||
|
||||
### Priority
|
||||
### 优先级
|
||||
|
||||
Crafting recipes support an additional property for handling input collisions, `"priority"`, which primarily acts as a [tiebreaker](#prioritization) when multiple recipes could possibly apply to the given situation. Priorities are provided directly within the crafting recipe type object.
|
||||
合成配方支持额外的`"priority"`属性处理输入冲突,主要在[优先级排序](#优先级排序)时作为决胜条件。
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_shaped/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_shaped/]
|
||||
"priority": 2
|
||||
```
|
||||
:::
|
||||
|
||||
Crafting recipes with lower priority values take precedence. So, if all else is equal, a recipe with a priority of `0` would be used over a recipe with priority `1`. Priorities may be negative if necessary. If `"priority"` is not provided, a priority of `0` is implied.
|
||||
数值较小的配方优先级更高(如优先级`0`优于`1`)。支持负值,未提供时默认为`0`。
|
||||
|
||||
## Heating
|
||||
## 加热系统
|
||||
|
||||
Furnace recipes are used to transform an item using a heat source over a period of time. A slight misnomer, furnace recipes are used with any interface that involves a heat source, including campfires.
|
||||
熔炉配方通过热源随时间转换物品。虽然名称局限,实际适用于所有热源界面(包括营火)。
|
||||
|
||||

|
||||
|
||||
<CodeHeader>BP/recipes/magic/magic_ash.json</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [BP/recipes/magic/magic_ash.json]
|
||||
{
|
||||
"format_version": "1.17.41",
|
||||
"minecraft:recipe_furnace": {
|
||||
@@ -633,71 +657,76 @@ Furnace recipes are used to transform an item using a heat source over a period
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
All vanilla heating blocks are supported via tags.
|
||||
支持所有原版加热方块的标签:
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_furnace/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_furnace/]
|
||||
"tags": ["furnace", "blast_furnace", "smoker", "campfire", "soul_campfire"]
|
||||
```
|
||||
:::
|
||||
|
||||
### Heating Transactions
|
||||
### 加热转换
|
||||
|
||||
Furnace recipes bind exactly one input [item descriptor](#item-descriptors) to exactly one output item descriptor.
|
||||
熔炉配方将单个输入[物品描述符](#物品描述符)绑定到单个输出物品描述符。
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_furnace/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_furnace/]
|
||||
"input": "wiki:bone_fragments"
|
||||
"output": {
|
||||
"item": "wiki:magic_ash",
|
||||
"count": 4
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
Any count given in the input is ignored. XP returns and fuel sources for a cooking and smelting recipe cannot be altered. The time required to heat an item is set by the used block and is unchangeable.
|
||||
输入中的数量值会被忽略。无法修改经验返还和燃料设定,加热时间由使用的方块决定且不可更改。
|
||||
|
||||
## Brewing
|
||||
## 酿造系统
|
||||
|
||||
Brewing recipes are used to transform an item using another item as a catalyst. Two brewing recipe types are available: [brewing mixes](#brewing-mixes), which do not transition data from input to output, and [brewing containers](#brewing-containers), which do.
|
||||
酿造配方通过催化剂物品转换另一物品。支持两种类型:[酿造混合](#酿造混合)(不传递输入输出数据)和[酿造容器](#酿造容器)(传递数据)。
|
||||
|
||||
Only one interface supports brewing recipes:
|
||||
仅一种界面支持酿造配方:
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_brewing_container/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_brewing_container/]
|
||||
"tags": ["brewing_stand"]
|
||||
```
|
||||
:::
|
||||
|
||||
### Brewing Transactions
|
||||
### 酿造转换
|
||||
|
||||
Brewing transactions are similar to [heating transactions](#heating-transactions), requiring an input and output, each pointing to a single [item descriptor](#item-descriptors). Brewing recipes, however, also require the `"reagent"` property as a catalyst, which also can only point to a single item descriptor.
|
||||
酿造转换类似[加热转换](#加热转换),需要输入和输出各一个[物品描述符](#物品描述符)。此外还需`"reagent"`属性作为催化剂(也仅接受单个物品描述符)。
|
||||
|
||||
<CodeHeader>#/minecraft:recipe_brewing_mix/</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/minecraft:recipe_brewing_mix/]
|
||||
"input": "wiki:flask",
|
||||
"reagent": "wiki:jade",
|
||||
"output": "wiki:insanity_resistance"
|
||||
```
|
||||
|
||||
Provided count values are ignored in these brewing properties. Items are meant to transform one at a time in a brew.
|
||||
|
||||
::: warning
|
||||
If the input item for a brewing recipe has the ability to stack, the _entire_ stack will be consumed in the transformation. There are currently no workarounds to avoid this.
|
||||
:::
|
||||
|
||||
After the brewing time has passed, the catalyst is consumed, and output items directly replace input items.
|
||||
这些属性中的数量值会被忽略,物品每次转换一个。
|
||||
|
||||
::: warning
|
||||
Currently, the stackability of the produced output is bugged, regardless of whether a data value was specified. In particular, the output is incompatible and will not stack with items of the same identifier and data value.
|
||||
若酿造配方的输入物品可堆叠,将消耗整个堆叠。目前无法避免此行为。
|
||||
:::
|
||||
|
||||
### Brewing Mixes
|
||||
酿造完成后催化剂被消耗,输出物品直接替换输入物品。
|
||||
|
||||
Brewing mixes are simple brewing recipes theoretically designed to isolate the data value of the input from the data value of the output.
|
||||
::: warning
|
||||
当前无论是否指定数据值,产出物品的堆叠都存在bug,无法与相同标识符和数据值的物品堆叠。
|
||||
:::
|
||||
|
||||
### 酿造混合
|
||||
|
||||
酿造混合是简单的酿造配方,理论上设计用于隔离输入输出的数据值。
|
||||
|
||||

|
||||
|
||||
<CodeHeader>BP/recipes/brewing/negative/paralysis.json</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [BP/recipes/brewing/negative/paralysis.json]
|
||||
{
|
||||
"format_version": "1.17.41",
|
||||
"minecraft:recipe_brewing_mix": {
|
||||
@@ -711,28 +740,28 @@ Brewing mixes are simple brewing recipes theoretically designed to isolate the d
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
::: warning
|
||||
Unfortunately, assigned data values are broken for brewing mix recipes.
|
||||
|
||||
In general, a brewing recipe will never work if a data value is supplied to the input. The only exceptions are if the input is one of the following:
|
||||
|
||||
- `minecraft:potion`
|
||||
- `minecraft:splash_potion`
|
||||
- `minecraft:lingering_potion`
|
||||
- [Potion identifier additions](#identifier-additions)
|
||||
|
||||
If a data value is specified for a reagent using the `"data"` property format, a brew occurs when any item with the given identifier is placed as a reagent for that recipe, regardless of data value. However, the brew only succeeds if the correct data value is matched. If it’s not, the brew will appear to succeed, but the input will not be transformed into the output; despite the brew failing, the reagent and a percentage of the blaze powder fuel are consumed anyway.
|
||||
:::
|
||||
|
||||
### Brewing Containers
|
||||
::: warning
|
||||
不幸的是,酿造混合配方的数据值设定存在缺陷。
|
||||
|
||||
Brewing containers are designed to pass the data value of an input to the transformed output.
|
||||
通常,若对输入指定数据值,酿造配方将完全失效。例外情况是输入为以下之一:
|
||||
- `minecraft:potion`
|
||||
- `minecraft:splash_potion`
|
||||
- `minecraft:lingering_potion`
|
||||
- [药水特殊标识符](#特殊标识符)
|
||||
|
||||
若通过`"data"`属性为催化剂指定数据值,当酿造台放入该标识符物品时会触发酿造(无论数据值是否匹配)。但只有数据值正确时才会成功转换,否则看似成功实则不转换输入(但仍会消耗催化剂和部分烈焰粉燃料)。
|
||||
:::
|
||||
|
||||
### 酿造容器
|
||||
|
||||
酿造容器设计用于将输入数据值传递到输出。
|
||||
|
||||

|
||||
|
||||
<CodeHeader>BP/recipes/illumination_potion.json</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [BP/recipes/illumination_potion.json]
|
||||
{
|
||||
"format_version": "1.17.41",
|
||||
"minecraft:recipe_brewing_container": {
|
||||
@@ -746,33 +775,32 @@ Brewing containers are designed to pass the data value of an input to the transf
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Brewing containers are stricter than [brewing mixes](#brewing-mixes) about their inputs. Only the following item types are allowed in a brewing container recipe:
|
||||
|
||||
- `minecraft:potion`
|
||||
- `minecraft:splash_potion`
|
||||
- `minecraft:lingering_potion`
|
||||
- [Potion identifier additions](#identifier-additions)
|
||||
|
||||
Because the data value is carried downstream from input to output in a brewing container recipe, assigned data values in `"input"` and `"output"` are ignored.
|
||||
|
||||
## Overrides
|
||||
|
||||
As with all domains in add-ons, the pack order in the behavior pack list affects how Minecraft chooses files to use during gameplay. Higher-listed behavior pack entries take priority over lower-listed ones, including the base vanilla pack.
|
||||
|
||||
To override a recipe in a lower-listed pack, the recipe type and identifiers must both match. The override file can be named and located in any way — only the contents matter. Partial overrides are not accepted in recipes; the entire recipe must be redefined.
|
||||
|
||||
::: warning
|
||||
Overrides only work if the recipe type is an _exact_ match. In most cases, a mismatch results in a new recipe created alongside the existing one.
|
||||
|
||||
If attempting to construct an override that converts between the two crafting recipe types, an error will be thrown. To circumvent this, first copy the vanilla definition into the pack. Next, set the `"tags"` for that file to `[""]`; this effectively disables the recipe. Finally, set up a new file as the other crafting recipe type, choosing a different identifier to avoid the error.
|
||||
:::
|
||||
|
||||
## Prioritization
|
||||
比[酿造混合](#酿造混合)更严格,仅允许以下输入类型:
|
||||
- `minecraft:potion`
|
||||
- `minecraft:splash_potion`
|
||||
- `minecraft:lingering_potion`
|
||||
- [药水特殊标识符](#特殊标识符)
|
||||
|
||||
After considering [overrides](#overrides), if multiple recipes would apply based on the inputs, the outputs are selected using the following tiebreakers, considered in order:
|
||||
由于数据值从输入传递到输出,`"input"`和`"output"`中指定的数据值会被忽略。
|
||||
|
||||
- Recipes declared in higher-ordered packs in the world behavior packs list
|
||||
- If for crafting recipes, _lower_-valued [priority properties](#priority)
|
||||
- If for crafting recipes, [shaped recipes](#shaped-recipes) over [shapeless ones](#shapeless-recipes)
|
||||
- "Lesser" identifiers, as interpreted by string comparison
|
||||
## 覆盖机制
|
||||
|
||||
与所有附加组件领域相同,行为包加载顺序影响游戏中选择的文件。列表中靠前的行为包会覆盖靠后的(包括原版基础包)。
|
||||
|
||||
要覆盖低优先级包的配方,需完全匹配配方类型和标识符。覆盖文件可任意命名存放——仅内容重要。配方不支持部分覆盖,必须完全重新定义。
|
||||
|
||||
::: warning
|
||||
仅当配方类型完全匹配时覆盖才生效。多数情况下不匹配会导致新建配方而非覆盖。
|
||||
|
||||
若尝试在两种合成配方类型间转换覆盖,将抛出错误。解决方案:先复制原版定义到包中,将其`"tags"`设为`[""]`(禁用配方),再新建另一种类型的配方文件(使用不同标识符避免冲突)。
|
||||
:::
|
||||
|
||||
## 优先级排序
|
||||
|
||||
考虑[覆盖机制](#覆盖机制)后,若多个配方匹配输入,按以下顺序决胜:
|
||||
1. 行为包列表中更高优先级的包
|
||||
2. 合成配方中更小的[优先级值](#优先级)
|
||||
3. 合成配方中[有序配方](#有序配方)优于[无序配方](#无序配方)
|
||||
4. 字典序较小的标识符字符串
|
||||
@@ -1,28 +1,32 @@
|
||||
---
|
||||
title: Trade Tables
|
||||
category: Documentation
|
||||
title: 交易表
|
||||
category: 文档
|
||||
nav_order: 2
|
||||
tags:
|
||||
- Stable
|
||||
- Last updated for Version 1.18.10
|
||||
- 稳定版
|
||||
- 最后更新于版本1.18.10
|
||||
mentions:
|
||||
- Ciosciaa
|
||||
- SirLich
|
||||
- TheItsNameless
|
||||
---
|
||||
|
||||
Trade tables represent the fundamental data behind trading item transactions for an entity. Trade tables are not standalone; they must be referenced from an [entity component](https://bedrock.dev/docs/stable/Entities#minecraft%3Aeconomy_trade_table). Using the randomizing properties available to trade tables, trade offers, item counts, and cost calculations may vary across entity instances, even if all would point to the same trade table.
|
||||
# 交易表
|
||||
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
交易表是实体进行物品交易的基础数据载体。交易表不能独立使用,必须通过[实体组件](https://bedrock.dev/docs/stable/Entities#minecraft%3Aeconomy_trade_table)引用。利用交易表提供的随机化特性,即使多个实体实例引用同一交易表,其交易报价、物品数量和成本计算也可能各不相同。
|
||||
|
||||

|
||||
|
||||
Trade tables are not identified or versioned. Like loot tables, trade tables do not support Molang and instead rely on JSON constructs, like range objects and [functions](#functions). Despite being different, trade tables still support comments.
|
||||
交易表没有标识符或版本控制。与战利品表类似,交易表不支持Molang,而是依赖JSON结构(如范围对象和[函数](#functions))。虽然结构不同,交易表仍支持注释功能。
|
||||
|
||||
## Integration
|
||||
## 集成方式
|
||||
|
||||
Trade tables don't represent a primary add-on system, like blocks or biomes. They aren't registered by being placed in a specific folder; instead, they're referenced (from entities). Trade tables may be placed anywhere within a behavior pack.
|
||||
交易表不属于核心附加系统(如方块或生物群系)。它们不是通过放置在特定文件夹来注册,而是通过实体引用。交易表可以放置在行为包的任何位置。
|
||||
|
||||
::: tip
|
||||
It's recommended to follow vanilla convention and place all trade tables within the top-level `trading` directory in a behavior pack. From there, any hierarchy can be employed.
|
||||
建议遵循原版规范,将所有交易表放在行为包的顶级`trading`目录下。在此目录下可采用任意层级结构。
|
||||
:::
|
||||
|
||||
<FolderView
|
||||
@@ -32,12 +36,12 @@ It's recommended to follow vanilla convention and place all trade tables within
|
||||
]"
|
||||
/>
|
||||
|
||||
The following example is referenced and analyzed throughout the document:
|
||||
下文将通过一个贯穿文档的示例进行分析:
|
||||
|
||||
<Spoiler title="Trade Table File Example">
|
||||
::: details 交易表示例文件
|
||||
|
||||
<CodeHeader>BP/trading/minister.json</CodeHeader>
|
||||
```json
|
||||
::: code-group
|
||||
```json [BP/trading/minister.json]
|
||||
{
|
||||
"tiers": [
|
||||
{
|
||||
@@ -159,15 +163,14 @@ The following example is referenced and analyzed throughout the document:
|
||||
]
|
||||
}
|
||||
```
|
||||
</Spoiler>
|
||||
:::
|
||||
|
||||
## Structure
|
||||
## 结构
|
||||
|
||||
Trade tables are represented as un-versioned, un-namespaced objects.
|
||||
交易表采用无版本、无命名空间的JSON对象结构。
|
||||
|
||||
<CodeHeader>#</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [#]
|
||||
{
|
||||
"tiers": [
|
||||
{
|
||||
@@ -175,204 +178,200 @@ Trade tables are represented as un-versioned, un-namespaced objects.
|
||||
},
|
||||
{
|
||||
"total_exp_required": 28,
|
||||
|
||||
"trades": […]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
Trade tables use [tiers](#tiers) to structure trade organization. Tiers are defined with the required top-level `"tiers"` array property. Tiers appear in order in the trading interface.
|
||||
交易表使用[层级(tiers)](#tiers)来组织交易结构。层级通过顶层的必需数组属性`"tiers"`定义。层级会按照顺序显示在交易界面中。
|
||||
|
||||
### Tiers
|
||||
### 交易层级
|
||||
|
||||
Tiers act as an unlockable set of trades and represent the highest level of grouping in a trade table.
|
||||
层级代表可解锁的交易集合,是交易表中的最高级分组单位。
|
||||
|
||||
<CodeHeader>#/tiers/0</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/tiers/0]
|
||||
{
|
||||
"groups": […]
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
<CodeHeader>#/tiers/1</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/tiers/1]
|
||||
{
|
||||
"total_exp_required": 28,
|
||||
|
||||
"trades": […]
|
||||
}
|
||||
```
|
||||
|
||||
Each tier must either represent a set of [trades](#trades) (as `"trades"`) or [trade groups](#groups) (as `"groups"`); one of these properties is required. If trades are specified, all such trades will appear for that tier. If instead groups are given, trades from all listed groups will be used for that tier; how each group selects its trades depends on its configuration.
|
||||
|
||||
::: tip NOTE
|
||||
If both `"trades"` and `"groups"` are given in a tier, the trades declaration is ignored in favor of groups.
|
||||
:::
|
||||
|
||||
Within a tier, trades appear in order in the trading interface. If trades are grouped, those groups will appear in their defined order as well, organized by group and then by trade. Trades in one group are not visually differentiable from trades in other groups; only tiers are visually separated and identifiable.
|
||||
每个层级必须包含[交易(trades)](#trades)数组(`"trades"`)或[交易组(groups)](#groups)数组(`"groups"`)中的至少一个属性。如果指定交易数组,该层级将显示所有列出的交易。如果指定交易组数组,则根据组配置从所有列出的组中选择交易。
|
||||
|
||||
#### Experience Requirement
|
||||
::: tip 注意
|
||||
如果同时指定`"trades"`和`"groups"`,系统会优先使用groups而忽略trades声明。
|
||||
:::
|
||||
|
||||
Tiers are unlocked when the _trader_ meets experience thresholds. Each trader has its own internal lifetime experience that accumulates when trading with players. The amount of experience obtained per trade depends on that trade's [experience reward](#trader-experience). The optional `"total_exp_required"` property specifies how much experience the trader needs in order for that tier to unlock.
|
||||
在层级内部,交易会按照定义顺序显示。如果交易分组,各组及其内部交易也会按定义顺序组织。不同组的交易在视觉上没有区分,只有层级会进行视觉分隔和标识。
|
||||
|
||||
<CodeHeader>#/tiers/1/</CodeHeader>
|
||||
#### 经验需求
|
||||
|
||||
```json
|
||||
当交易者达到经验阈值时,层级会被解锁。每个交易者有独立的累计经验值,通过与玩家交易获得。每次交易获得的经验量取决于该交易的[交易者经验奖励](#trader-experience)。可选属性`"total_exp_required"`指定交易者解锁该层级所需的总经验值。
|
||||
|
||||
::: code-group
|
||||
```json [#/tiers/1/]
|
||||
"total_exp_required": 28
|
||||
```
|
||||
|
||||
By default, the amount of experience needed is set to the index of the trade tier. Therefore, the second tier would require the trader to have 1 XP; the third tier would require 2 XP; and so forth. The first tier is always unlocked automatically, [regardless of its set experience threshold](#initial-tier-experience).
|
||||
|
||||
#### Tier Unlocking
|
||||
|
||||
Tiers are unlocked in order. When a new tier is unlocked, the subsequent tier is additionally checked to see if its threshold is met by the current XP. If it is, it unlocks and checks its subsequent tier, and so forth. Tier unlocking is checked when the rewarded trader experience would suffice for multiple tiers or if a [provided initial experience](#initial-tier-experience) would unlock subsequent tiers when correctly updated by the game.
|
||||
|
||||
::: tip NOTE
|
||||
Since tiers are checked one-at-a-time, if tier unlocking would stop due to the XP requirements of a tier not being met, no subsequent tiers will be checked, even if those later tiers' XP requirements have been met.
|
||||
:::
|
||||
|
||||
##### Initial Tier Experience
|
||||
默认情况下,所需经验值等于交易层级的索引值。因此第二层需要交易者有1点经验,第三层需要2点,以此类推。[无论设置如何](#initial-tier-experience),第一层级总是自动解锁。
|
||||
|
||||
Special handling occurs for a non-zero experience threshold in the first tier. If negative, _all_ tiers will be unlocked. If greater than 0, the initial experience of the trader is set to the provided value.
|
||||
#### 层级解锁机制
|
||||
|
||||
层级按顺序解锁。当新层级解锁时,系统会检查后续层级是否满足当前经验值的阈值要求。如果满足则继续解锁后续层级,依此类推。在以下情况会触发层级解锁检查:(1) 获得的交易者经验足以解锁多个层级时;(2) 游戏正确更新后,[提供的初始经验](#initial-tier-experience)可以解锁后续层级时。
|
||||
|
||||
::: tip 注意
|
||||
由于层级是逐个检查的,如果某个层级的经验要求未满足导致解锁中断,即使后续层级的经验要求已满足,也不会继续检查。
|
||||
:::
|
||||
|
||||
##### 初始层级经验
|
||||
|
||||
第一层级的非零经验阈值有特殊处理:如果为负数,将解锁所有层级;如果大于0,交易者的初始经验值将被设为该值。
|
||||
|
||||
::: warning
|
||||
When the initial tier's experience threshold is non-zero, a manual update is required for a trader's trades to reflect the actual nature of their trade table. In these cases, performing a trade or closing and re-opening the trading interface will update the interface correctly. Initially, only the first tier will be available even if other tiers should be unlocked.
|
||||
当第一层级的经验阈值非零时,需要手动更新才能使交易者的交易界面正确反映交易表实际状态。此时需要进行一次交易或关闭再重新打开交易界面才能正确更新界面显示。初始时即使其他层级应该解锁,也只会显示第一层级。
|
||||
:::
|
||||
|
||||
##### Tier Freezing
|
||||
##### 层级冻结
|
||||
|
||||
Excluding the [initial tier](#initial-tier-experience), it's possible to freeze trades at a tier:
|
||||
除[初始层级](#initial-tier-experience)外,可以将交易冻结在某个层级:
|
||||
|
||||
<CodeHeader>Example Tier Freeze</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [示例层级冻结]
|
||||
"total_exp_required": -1
|
||||
```
|
||||
:::
|
||||
|
||||
When its prior tier is unlocked, a tier with a negative XP requirement will immediately unlock, [as expected](#tier-unlocking). However, it will be impossible for the player to progress to any subsequent tiers.
|
||||
当上一层级解锁时,经验要求为负数的层级会立即解锁([符合预期](#tier-unlocking)),但玩家将无法继续解锁后续任何层级。
|
||||
|
||||
### Trade Groups
|
||||
### 交易组
|
||||
|
||||
Trade groups are a way to randomly select which trades an individual trader should use for a tier.
|
||||
交易组用于随机选择单个交易者在某个层级应该使用的交易。
|
||||
|
||||
<CodeHeader>#/tiers/0/groups/0</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/tiers/0/groups/0]
|
||||
{
|
||||
"num_to_select": 1,
|
||||
|
||||
"trades": […]
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
The trades from which to select are given with the required `"trades"` array; each entry is a [trade](#trades). A select number of these trades, indicated by the optional `"num_to_select"` property, will be picked for that tier for each trader. If `"num_to_select"` is `0`, all trades will be selected; this is the default.
|
||||
通过必需的`"trades"`数组指定候选交易,每个条目都是一个[交易](#trades)。可选属性`"num_to_select"`表示每个交易者实例在该层级选择交易的数量。如果`"num_to_select"`为0(默认值),将选择所有交易。
|
||||
|
||||
::: tip NOTE
|
||||
Trade groups cannot be nested for advanced chance selection.
|
||||
::: tip 注意
|
||||
交易组不支持嵌套以实现高级概率选择。
|
||||
:::
|
||||
|
||||
::: tip
|
||||
Currently, no random selection count is possible. Nor is weighting by trade, but trades can be duplicated within the array to effectively increase their likelihood of being selected.
|
||||
目前无法随机选择数量,也无法按交易设置权重。但可以通过在数组中重复交易条目来有效增加其被选中的概率。
|
||||
:::
|
||||
|
||||
### Trades
|
||||
### 交易
|
||||
|
||||
Trades represent a transaction between a trader and the player.
|
||||
交易代表交易者与玩家之间的物品交换。
|
||||
|
||||
<CodeHeader>#/tiers/0/trades/1</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/tiers/0/trades/1]
|
||||
{
|
||||
"wants": […],
|
||||
"gives": […],
|
||||
"max_uses": 2,
|
||||
|
||||
"reward_exp": false,
|
||||
"trader_exp": 8
|
||||
}
|
||||
```
|
||||
|
||||
Once a trade is picked for a trade slot, it will not fundamentally change. Only the [quantity](#quantity) can be modified in certain situations.
|
||||
|
||||
::: tip
|
||||
Individual trade definitions can affect more than just trades themselves. Notably, an entity can [hold a particular item](https://bedrock.dev/docs/stable/Entities#minecraft%3Abehavior.trade_interest) in response to the player holding an item.
|
||||
:::
|
||||
|
||||
#### Wanted and Given Items
|
||||
一旦交易被选入交易槽,其基本内容不会改变。只有[数量](#quantity)在某些情况下可能被修改。
|
||||
|
||||
The fundamental transactional units are declared using `"wants"` and `"gives"`; players trade with `"wants"` to receive `"gives"`. Both properties must be arrays and are required.
|
||||
::: tip
|
||||
单个交易定义可以影响交易之外的内容。值得注意的是,实体可以[持有特定物品](https://bedrock.dev/docs/stable/Entities#minecraft%3Abehavior.trade_interest)来响应玩家持有的物品。
|
||||
:::
|
||||
|
||||
<CodeHeader>#/tiers/0/trades/1/</CodeHeader>
|
||||
#### 需求与给予物品
|
||||
|
||||
```json
|
||||
基础交易单元通过`"wants"`和`"gives"`声明:玩家用`"wants"`交换`"gives"`。这两个属性都是必需的数组。
|
||||
|
||||
::: code-group
|
||||
```json [#/tiers/0/trades/1/]
|
||||
"wants": […],
|
||||
"gives": […]
|
||||
```
|
||||
|
||||
A trade can have between 1 and 2 wanted entries and must have exactly 1 given entry. Each entry of either array may be either an [item](#items) or a [choice](#choices).
|
||||
|
||||
The trading interface will adapt depending on the number of items wanted. In some circumstances, some trading modifiers, such as [quantity-modifying enchantment functions](#quantity-modifying-enchantment-functions), only affect the first wanted item.
|
||||
|
||||
::: tip NOTE
|
||||
If an object is provided as an entry that contains both item and choice properties, only the choice part is considered; the item parts will be ignored.
|
||||
:::
|
||||
|
||||
#### Trade Limit
|
||||
每笔交易可以有1-2个需求条目,必须有1个给予条目。每个条目可以是[物品](#items)或[选择项](#choices)。
|
||||
|
||||
A trader can typically only perform an individual trade a set number of times before having to resupply. The numeric `"max_uses"` property configures this number.
|
||||
交易界面会根据需求物品数量自动调整。某些情况下,[数量修改附魔函数](#quantity-modifying-enchantment-functions)等交易修饰符只影响第一个需求物品。
|
||||
|
||||
<CodeHeader>#/tiers/0/trades/1/</CodeHeader>
|
||||
::: tip 注意
|
||||
如果条目对象同时包含item和choice属性,只有choice部分会被考虑,item部分将被忽略。
|
||||
:::
|
||||
|
||||
```json
|
||||
#### 交易次数限制
|
||||
|
||||
交易者通常只能在补充库存前执行有限次数的单个交易。数值属性`"max_uses"`配置这个限制次数。
|
||||
|
||||
::: code-group
|
||||
```json [#/tiers/0/trades/1/]
|
||||
"max_uses": 2
|
||||
```
|
||||
|
||||
Trade limits are specific to each trade. Diminishing supply in one trade won't affect another trade, even if both trades have the same wanted and given items. By default, a trader will be able to carry out an individual trade 7 times before needing to resupply.
|
||||
|
||||
::: tip NOTE
|
||||
The act of resupplying is handled by an entity component (`"minecraft:trade_resupply": {}`).
|
||||
:::
|
||||
|
||||
If a value of `0` is given, that trade will be shown in the trading interface but will be impossible to use. If a negative value is given, that trade will never need resupplying; it will be infinitely usable.
|
||||
交易限制是每个交易独立的。一个交易的库存减少不会影响另一个交易,即使两者需求与给予物品完全相同。默认情况下,交易者可以在需要补充前执行7次单个交易。
|
||||
|
||||
#### Player Experience
|
||||
::: tip 注意
|
||||
补充行为由实体组件(`"minecraft:trade_resupply": {}`)处理。
|
||||
:::
|
||||
|
||||
Experience orbs intended for the _player_ can be disabled for a trade using the optional Boolean `"reward_exp"` property.
|
||||
如果值为0,该交易会显示在界面中但无法使用。如果为负值,该交易将无限次使用,无需补充。
|
||||
|
||||
<CodeHeader>#/tiers/0/trades/1/</CodeHeader>
|
||||
#### 玩家经验
|
||||
|
||||
```json
|
||||
通过可选布尔属性`"reward_exp"`可以禁用交易给玩家的经验球。
|
||||
|
||||
::: code-group
|
||||
```json [#/tiers/0/trades/1/]
|
||||
"reward_exp": false
|
||||
```
|
||||
|
||||
By default, `"reward_exp"` is true, and the player will be rewarded with some experience for trading. The amount of experience received is not modifiable within a trade table.
|
||||
|
||||
#### Trader Experience
|
||||
|
||||
Traders may receive experience when the player finalizes a trade. This property is the key to establishing a trade progression system with a trader using [tiers](#tiers).
|
||||
|
||||
<CodeHeader>#/tiers/0/trades/1/</CodeHeader>
|
||||
|
||||
```json
|
||||
"trader_exp": 8
|
||||
```
|
||||
|
||||
The amount of experience to reward the _trader_ is given the the optional numeric property `"trader_exp"`. By default, the trader will receive 1 XP.
|
||||
|
||||
::: tip
|
||||
For non-linearly spaced tiers, it's typical for the trader experience to increase in higher tiers. This way, lower-tier trades will have less leveling impact than higher-tier trades.
|
||||
:::
|
||||
|
||||
### Choices
|
||||
默认`"reward_exp"`为true,玩家会因交易获得经验。交易表中无法修改获得的经验量。
|
||||
|
||||
Choices are simple objects for randomly selecting an item to use for a trade. One item is selected with uniform randomness for that trade for each instance of a trader.
|
||||
#### 交易者经验
|
||||
|
||||
<CodeHeader>#/tiers/1/trades/0/wants/0</CodeHeader>
|
||||
玩家完成交易时,交易者可能获得经验。此属性是通过[层级](#tiers)建立交易者交易进度系统的关键。
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/tiers/0/trades/1/]
|
||||
"trader_exp": 8
|
||||
```
|
||||
:::
|
||||
|
||||
可选数值属性`"trader_exp"`设置奖励给交易者的经验值。默认交易者获得1点经验。
|
||||
|
||||
::: tip
|
||||
对于非线性分布的层级,通常高阶交易的交易者经验奖励更高。这样低阶交易对升级的影响小于高阶交易。
|
||||
:::
|
||||
|
||||
### 选择项
|
||||
|
||||
选择项是简单对象,用于随机选择交易使用的物品。每个交易者实例会均匀随机选择一个物品用于该交易。
|
||||
|
||||
::: code-group
|
||||
```json [#/tiers/1/trades/0/wants/0]
|
||||
{
|
||||
"choice": [
|
||||
{
|
||||
@@ -386,44 +385,42 @@ Choices are simple objects for randomly selecting an item to use for a trade. On
|
||||
]
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
Choices only contain the required `"choice"` array property. Each entry in the array is an [item](#items). At least one item must be provided.
|
||||
选择项只包含必需的`"choice"`数组属性。数组中必须至少提供一个物品条目。
|
||||
|
||||
::: tip NOTE
|
||||
Choices cannot be nested.
|
||||
::: tip 注意
|
||||
选择项不能嵌套。
|
||||
:::
|
||||
|
||||
::: tip
|
||||
There are currently no means of specifying a weight for a given item, but an item may be duplicated within the array to effectively increase its likelihood for being selected.
|
||||
目前无法为物品指定权重,但可以通过在数组中重复物品来有效增加其被选中的概率。
|
||||
:::
|
||||
|
||||
### Items
|
||||
### 物品
|
||||
|
||||
Items are the subjects of a trade. Their definitions are shared between wanted and given items, but there are some various implications depending on location used.
|
||||
物品是交易的主体。其定义在需求与给予物品间共享,但根据使用位置有不同的含义。
|
||||
|
||||
<CodeHeader>#/tiers/1/trades/0/wants/0/choice/0</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/tiers/1/trades/0/wants/0/choice/0]
|
||||
{
|
||||
"item": "wiki:sacred_stones",
|
||||
"quantity": {
|
||||
"min": 4,
|
||||
"max": 6
|
||||
},
|
||||
|
||||
"price_multiplier": 0.5
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
<CodeHeader>#/tiers/0/groups/0/trades/1/gives/0</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/tiers/0/groups/0/trades/1/gives/0]
|
||||
{
|
||||
"item": "wiki:exalted_blade",
|
||||
"functions": [
|
||||
{
|
||||
"function": "enchant_with_levels",
|
||||
|
||||
"treasure": true,
|
||||
"levels": {
|
||||
"min": 15,
|
||||
@@ -433,112 +430,109 @@ Items are the subjects of a trade. Their definitions are shared between wanted a
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### Item Reference
|
||||
|
||||
Items are referenced within trades using the required `"item"` string property.
|
||||
|
||||
<CodeHeader>#/tiers/1/trades/0/wants/0/choice/0/</CodeHeader>
|
||||
|
||||
```json
|
||||
"item": "wiki:exalted_blade"
|
||||
```
|
||||
|
||||
The item reference must point to the identifier of an item. A data value can be provided in-place to the reference as a suffix:
|
||||
|
||||
<CodeHeader>Example Data Assignment</CodeHeader>
|
||||
|
||||
```json
|
||||
"item": "minecraft:log:2"
|
||||
```
|
||||
|
||||
::: tip
|
||||
Data values can also be set (and much more conveniently randomized) using the `set_data` function.
|
||||
:::
|
||||
|
||||
If no data value is specified for a _wanted_ item, any item with that identifier may be traded. If no data value is specified for a _given_ item, a data value of `0` is implied.
|
||||
#### 物品引用
|
||||
|
||||
#### Quantity
|
||||
通过必需的字符串属性`"item"`在交易中引用物品。
|
||||
|
||||
The optional `"quantity"` property specifies the count of items wanted or given in a trade.
|
||||
::: code-group
|
||||
```json [#/tiers/1/trades/0/wants/0/choice/0/]
|
||||
"item": "wiki:exalted_blade"
|
||||
```
|
||||
:::
|
||||
|
||||
<CodeHeader>#/tiers/1/trades/0/wants/0/choice/0/</CodeHeader>
|
||||
物品引用必须指向物品标识符。可以直接在引用后缀中指定数据值:
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [示例数据值分配]
|
||||
"item": "minecraft:log:2"
|
||||
```
|
||||
:::
|
||||
|
||||
::: tip
|
||||
也可以通过`set_data`函数设置(更方便地随机化)数据值。
|
||||
:::
|
||||
|
||||
如果需求物品未指定数据值,任何该标识符的物品都可交易。如果给予物品未指定数据值,默认为0。
|
||||
|
||||
#### 数量
|
||||
|
||||
可选属性`"quantity"`指定交易中需求或给予的物品数量。
|
||||
|
||||
::: code-group
|
||||
```json [#/tiers/1/trades/0/wants/0/choice/0/]
|
||||
"quantity": {
|
||||
"min": 4,
|
||||
"max": 6
|
||||
}
|
||||
```
|
||||
|
||||
Quantity can be expressed as either an integer literal or a range object, such as seen above. If expressed as a range, a random value is selected uniformly inclusively within the specified limits. If no quantity is provided, the item count will default to 1.
|
||||
|
||||
::: tip NOTE
|
||||
Quantity is always bounded by the stack size and can only affect a single slot in a trade. It's impossible to, for example, enforce a requirement of 100 planks from a single slot (although this can be done using 2 `"wants"`) or giving 2 un-stackable swords to the player in a single trade.
|
||||
:::
|
||||
|
||||
#### Price Multiplier
|
||||
数量可以是整数或范围对象(如上)。如果是范围,会在最小最大值之间均匀随机选择。未指定时默认为1。
|
||||
|
||||
The price multiplier dictates how an item's [base quantity](#quantity) is altered due to certain events.
|
||||
::: tip 注意
|
||||
数量始终受堆叠限制,且只能影响交易中的单个槽位。无法通过单个槽位要求100个木板(虽然可以用2个`"wants"`实现),也无法通过单个交易给玩家2把不可堆叠的剑。
|
||||
:::
|
||||
|
||||
<CodeHeader>#/tiers/1/trades/0/wants/0/choice/0/</CodeHeader>
|
||||
#### 价格乘数
|
||||
|
||||
```json
|
||||
价格乘数决定物品的[基础数量](#quantity)如何因特定事件而变化。
|
||||
|
||||
::: code-group
|
||||
```json [#/tiers/1/trades/0/wants/0/choice/0/]
|
||||
"price_multiplier": 0.5
|
||||
```
|
||||
:::
|
||||
|
||||
`"price_multiplier"` is optional and defaults to `0`. Two systems exist that use the price multiplier: a modern and a legacy system. In the modern system, the given price multiplier can only affect the _first wanted item_ in a trade. In the legacy system, any _wanted items_ can be affected.
|
||||
`"price_multiplier"`可选,默认为0。存在新旧两套使用价格乘数的系统。新系统中,价格乘数只能影响交易的第一个需求物品。旧系统中,可以影响任何需求物品。
|
||||
|
||||
##### Fluctuation Factors
|
||||
##### 波动因素
|
||||
|
||||
Trade prices fluctuate as a result of serval factors:
|
||||
交易价格因以下因素波动:
|
||||
|
||||
- An increased demand, occurring when trading for the same item across multiple [resupplies](#trade-limit)
|
||||
- Being recently cured, such as villagers being cured from being zombie villagers
|
||||
- Being _near_ a trader who was recently cured
|
||||
- Trading with a player who is affected with "Hero of the Village"
|
||||
- 需求增加:同一物品在多次[补充](#trade-limit)后交易
|
||||
- 最近被治愈:如村民从僵尸村民治愈
|
||||
- 靠近最近被治愈的交易者
|
||||
- 与受"村庄英雄"效果影响的玩家交易
|
||||
|
||||
The price multiplier affects all these situations with the exception of a player having "Hero of the Village" when using the new pricing formula, which uses fixed values.
|
||||
除使用新定价公式的"村庄英雄"效果外,价格乘数影响所有这些情况。新公式使用固定值。
|
||||
|
||||
##### Cost Calculations
|
||||
##### 成本计算
|
||||
|
||||
The price multiplier directly and solely affects cost increases in response to an increased demand for a trade. By default, demand is 0 and cannot decrease past that value. Demand for a trade stacks, increasing when resupplying after that trade [has been exhausted](#trade-limit) and decreasing if no trades occurred between resupplies.
|
||||
价格乘数直接影响且仅影响因交易需求增加导致的成本上升。默认需求为0且不能为负。当交易[耗尽](#trade-limit)后补充时需求增加,如果在补充期间未发生交易则需求减少。
|
||||
|
||||
Cost increase due solely to demand is linear, where each increase in demand adds a proportion of the base cost, given by the price multiplier. Assuming the following variables…
|
||||
仅因需求增加的成本变化是线性的,每增加1点需求就增加基础成本的比例部分(由价格乘数决定)。假设以下变量:
|
||||
|
||||
| Variable | Meaning |
|
||||
| -------- | ------------------------------------------------------------------------------------ |
|
||||
| _c_ | Total cost |
|
||||
| _p_ | Base cost, including [quantity overrides](#quantity-modifying-enchantment-functions) |
|
||||
| _m_ | Price multiplier |
|
||||
| _d_ | Current demand |
|
||||
|
||||
<br>
|
||||
…The following formula can be used to calculate the total cost when no other factors are present:
|
||||
| 变量 | 含义 |
|
||||
|------|------|
|
||||
| _c_ | 总成本 |
|
||||
| _p_ | 基础成本(含[数量覆盖](#quantity-modifying-enchantment-functions)) |
|
||||
| _m_ | 价格乘数 |
|
||||
| _d_ | 当前需求 |
|
||||
|
||||
计算公式如下(无其他因素时):
|
||||
_c_ = _p_ × (1 + _m_ \* _d_)
|
||||
|
||||
::: tip NOTE
|
||||
Other situations additionally use entity properties for cost calculations and are not provided here.
|
||||
::: tip 注意
|
||||
其他情况还使用实体属性计算成本,此处不提供。
|
||||
:::
|
||||
|
||||
If the price multiplier is `0`, the quantity will remain constant in most situations (except the "Hero of the Village" modifier using the new pricing formula).
|
||||
如果价格乘数为0,在大多数情况下数量保持不变(使用新定价公式的"村庄英雄"修饰符除外)。
|
||||
|
||||
::: tip NOTE
|
||||
A negative price multiplier is possible but can't affect increasing costs due to [demand](#trade-limit); the multiplier will effectively be capped to `0`. However, negative values do affect prices in response to the trader recently being cured, the trader being nearby another trader who was recently cured, or trading with a player affected with "Hero of the Village" _using the legacy pricing formulas_.
|
||||
::: tip 注意
|
||||
负价格乘数可能,但不会影响因[需求](#trade-limit)增加导致的成本上升(乘数实际被限制为0)。但负值会影响交易者最近被治愈、靠近被治愈交易者或与受"村庄英雄"影响的玩家交易(使用旧定价公式时)的价格。
|
||||
:::
|
||||
|
||||
#### Functions
|
||||
#### 函数
|
||||
|
||||
Functions are used to modify the nature of the item. The optional `"functions"` array contains a collection of functions to be applied to the item.
|
||||
函数用于修改物品属性。可选数组`"functions"`包含应用于物品的函数集合。
|
||||
|
||||
<CodeHeader>#/tiers/0/groups/0/trades/1/gives/0/</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/tiers/0/groups/0/trades/1/gives/0/]
|
||||
"functions": [
|
||||
{
|
||||
"function": "enchant_with_levels",
|
||||
|
||||
"treasure": true,
|
||||
"levels": {
|
||||
"min": 15,
|
||||
@@ -547,56 +541,55 @@ Functions are used to modify the nature of the item. The optional `"functions"`
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
The functions used by trade tables are shared with loot tables. When used ([where usable](#unusable-wanted-item-functions)) in a wanted item declaration, they act to restrict the nature of the wanted item. Such function restrictions can only affect the first wanted item.
|
||||
|
||||
##### Generally Unusable Functions
|
||||
|
||||
In general, functions behave well for trading; however, the following do not work anywhere in trade tables:
|
||||
|
||||
- `set_count`
|
||||
- `furnace_smelt`
|
||||
- `looting_enchant`
|
||||
- `trader_material_type`
|
||||
|
||||
::: tip NOTE
|
||||
`set_count`'s functionality is replaced by the [quantity property](#quantity).
|
||||
|
||||
`trader_material_type`, seen only in a single vanilla trade table, would theoretically set the data value of the item based on the mark variant of the entity, but this doesn't seem to be usable in any custom way.
|
||||
:::
|
||||
|
||||
##### Unusable Wanted Item Functions
|
||||
交易表与战利品表共享函数。在需求物品声明中使用时([可用处](#unusable-wanted-item-functions)),用于限制需求物品的属性。此类函数限制只能影响第一个需求物品。
|
||||
|
||||
In general, using functions to specify item attributes for a wanted item will require the offered item to conform to those attributes. However, the following functions do not enforce a strict match and are therefore useless on wanted items:
|
||||
##### 通用不可用函数
|
||||
|
||||
- `set_name`
|
||||
- `set_lore`
|
||||
- `set_damage`
|
||||
- `set_book_contents`
|
||||
- `random_dye`
|
||||
- `fill_container`
|
||||
通常函数在交易中表现良好,但以下函数在交易表中完全无效:
|
||||
|
||||
##### Quantity-Modifying Enchantment Functions
|
||||
- `set_count`
|
||||
- `furnace_smelt`
|
||||
- `looting_enchant`
|
||||
- `trader_material_type`
|
||||
|
||||
2 functions actually set the quantity for the first _wanted item_ if being used as _given items_, potentially overriding any provided [quantity](#quantity) for that first wanted item:
|
||||
::: tip 注意
|
||||
`set_count`的功能由[quantity属性](#quantity)替代。
|
||||
|
||||
- `enchant_with_levels`
|
||||
- `enchant_book_for_trading`
|
||||
|
||||
::: tip NOTE
|
||||
Despite overriding the quantity, all [modified trade prices](#fluctuation-factors) adapt correctly. These functions cannot affect the quantity of a second wanted item, even when using the legacy cost formulas. If these functions are used on a _wanted item_, the quantity is not overridden.
|
||||
`trader_material_type`仅在一个原版交易表中出现,理论上会根据实体的mark变种设置物品数据值,但似乎无法自定义使用。
|
||||
:::
|
||||
|
||||
###### Enchant with Levels Function
|
||||
##### 需求物品不可用函数
|
||||
|
||||
`enchant_with_levels` randomly enchants an item as through enchanted from an enchantment table.
|
||||
通常使用函数指定需求物品属性会要求提供的物品符合这些属性。但以下函数不会强制严格匹配,因此在需求物品上无效:
|
||||
|
||||
<CodeHeader>#/tiers/0/groups/0/trades/1/gives/0/functions/0</CodeHeader>
|
||||
- `set_name`
|
||||
- `set_lore`
|
||||
- `set_damage`
|
||||
- `set_book_contents`
|
||||
- `random_dye`
|
||||
- `fill_container`
|
||||
|
||||
```json
|
||||
##### 修改数量的附魔函数
|
||||
|
||||
2个函数实际上会设置第一个需求物品的数量(当作为给予物品使用时),可能覆盖该需求物品的[quantity](#quantity):
|
||||
|
||||
- `enchant_with_levels`
|
||||
- `enchant_book_for_trading`
|
||||
|
||||
::: tip 注意
|
||||
尽管覆盖了数量,所有[修改的交易价格](#fluctuation-factors)都会正确调整。这些函数不能影响第二个需求物品的数量(即使使用旧成本公式)。如果在需求物品上使用这些函数,数量不会被覆盖。
|
||||
:::
|
||||
|
||||
###### 附魔等级函数
|
||||
|
||||
`enchant_with_levels`随机附魔物品,如同通过附魔台附魔。
|
||||
|
||||
::: code-group
|
||||
```json [#/tiers/0/groups/0/trades/1/gives/0/functions/0]
|
||||
{
|
||||
"function": "enchant_with_levels",
|
||||
|
||||
"treasure": true,
|
||||
"levels": {
|
||||
"min": 5,
|
||||
@@ -604,100 +597,97 @@ Despite overriding the quantity, all [modified trade prices](#fluctuation-factor
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
The cost for the first wanted item is determined by adding this function's chosen level value (capped to `0` if it would be negative) to the original [quantity](#quantity). The level value is computed from the optional `"levels"` property. If a numeric literal is used, that value is the chosen level value. If a range object is used, as above, a random number is rolled inclusively between the provided minimum and maximum. That random number then acts as the chosen level value. In the above example, the first wanted item's cost would be increased by 5 to 25.
|
||||
第一个需求物品的成本通过将此函数选择的等级值(如果为负则限制为0)加到原始[数量](#quantity)计算。等级值通过可选属性`"levels"`计算。如果使用数值,则为固定等级值。如果使用范围对象(如上),会在最小最大值之间随机选择。上例中第一个需求物品的成本会增加5-25。
|
||||
|
||||
###### Enchant Book for Trading Function
|
||||
###### 交易附魔书函数
|
||||
|
||||
`enchant_book_for_trading` is intended solely for trading. Its properties combine to determine the first wanted item's cost.
|
||||
`enchant_book_for_trading`专为交易设计。其属性共同决定第一个需求物品的成本。
|
||||
|
||||
<CodeHeader>#/tiers/0/groups/0/trades/0/gives/0/functions/0</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [#/tiers/0/groups/0/trades/0/gives/0/functions/0]
|
||||
{
|
||||
"function": "enchant_book_for_trading",
|
||||
|
||||
"base_cost": 4,
|
||||
"base_random_cost": 12,
|
||||
"per_level_cost": 4,
|
||||
"per_level_random_cost": 8
|
||||
}
|
||||
```
|
||||
|
||||
This function was only designed to be used on books, rolling for a single enchantment across all possible non-curse enchantments, including treasure enchantments. The function doesn't adapt to the current item. If used on a book, an enchantment will always successfully be applied; if used on something else enchantable, it's possible the item won't be successfully enchanted.
|
||||
|
||||
::: tip NOTE
|
||||
Presumably, when failing, the function rolls for an enchantment not applicable to the item and then fails to apply this irrelevant enchantment, resulting in an unenchanted item. The successfulness of enchanting a non-book is therefore proportional to the number of enchantments applicable to that item.
|
||||
:::
|
||||
|
||||
The total cost is set from a base cost, which is independent of the rolled enchantment, and a per-level cost, which is dependent on the random roll. All cost configuration properties are optional.
|
||||
此函数专为书籍设计,在所有可能的非诅咒附魔(包括宝藏附魔)中随机选择一项。函数不适配当前物品。用于书籍时总能成功附魔;用于其他可附魔物品时可能失败。
|
||||
|
||||
The base cost is computed by summing a starting value and a random roll. The starting value is given with `"base_cost"`, which defaults to `2`. The random roll is provided via `"base_random_cost"`, which defaults to `4`. A number will be uniformly randomly selected inclusively between 0 and the `"base_random_cost"` when a trade is generated for a trader.
|
||||
::: tip 注意
|
||||
失败时,函数可能选择了不适用于该物品的附魔导致附魔失败。因此非书籍物品的成功率与其适用附魔数量成正比。
|
||||
:::
|
||||
|
||||
For each level on the chosen enchantment, the same process occurs as in the base cost calculations: a fixed value is added to a uniformly randomly selected value. In this case, the base per-level cost is given with `"per_level_cost"`, which defaults to `3`, and the random per-level cost is given with `"per_level_random_cost"`, which defaults to `10`. The random per-level roll may be different for each level.
|
||||
总成本由基础成本(独立于随机附魔)和每级成本(依赖随机结果)组成。所有成本配置属性都是可选的。
|
||||
|
||||
Once the base cost and costs for each level are calculated, they are summed together to form the total cost. Finally, if the chosen enchantment is a treasure enchantment, the cost is then doubled. As usual, this cost cannot be less than 1 or greater than the stack size of that item. This formula holds true regardless of the pricing system being used by the trader.
|
||||
基础成本是起始值与随机值的和。起始值由`"base_cost"`设置(默认2),随机值由`"base_random_cost"`设置(默认4),在生成交易时均匀随机选择0到`"base_random_cost"`之间的值。
|
||||
|
||||
每级成本同样计算:固定值加上随机值。固定每级成本由`"per_level_cost"`设置(默认3),随机每级成本由`"per_level_random_cost"`设置(默认10)。每级的随机值可能不同。
|
||||
|
||||
计算基础成本和所有等级成本后求和得到总成本。如果选择的附魔是宝藏附魔,成本会翻倍。此成本不会小于1或大于物品堆叠上限。无论交易者使用何种定价系统,此公式都适用。
|
||||
|
||||
::: warning
|
||||
If either random cost property is negative, there seems to be a 50-50 chance that the cost will be either the given [quantity](#quantity) or the maximum stack size for that first wanted item.
|
||||
如果任一随机成本属性为负,似乎有50%概率使用给定的[数量](#quantity)或第一个需求物品的最大堆叠数作为成本。
|
||||
:::
|
||||
|
||||
::: tip
|
||||
If the total combined cost would be negative (assuming no negative random cost properties were used), the provided [quantity](#quantity) of the affected wanted item is used instead. The simplest means of guaranteeing this would be:
|
||||
如果总成本为负(假设未使用负随机成本属性),则使用受影响需求物品的[数量](#quantity)。最简单的保证方法是:
|
||||
|
||||
<CodeHeader>Example Quantity-Based Enchanted Book Cost</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [基于数量的附魔书成本示例]
|
||||
{
|
||||
"function": "enchant_book_for_trading",
|
||||
|
||||
"base_cost": -1,
|
||||
"base_random_cost": 0,
|
||||
"per_level_cost": 0,
|
||||
"per_level_random_cost": 0
|
||||
}
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
##### Spawn Egg Trader Binding
|
||||
##### 刷怪蛋绑定交易者
|
||||
|
||||
The `"set_actor_id"` function is used to set the data value of a spawn egg based on a provided entity identifier, given with `"id"`.
|
||||
`"set_actor_id"`函数通过`"id"`属性设置刷怪蛋的数据值(基于提供的实体标识符)。
|
||||
|
||||
<CodeHeader>Example Spawn Egg Trader Binding</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [刷怪蛋绑定交易者示例]
|
||||
{
|
||||
"function": "set_actor_id"
|
||||
}
|
||||
```
|
||||
|
||||
In trade tables, if no ID is provided, the trader's entity type will be assigned to the egg.
|
||||
|
||||
## Overrides
|
||||
|
||||
Because trade tables do not use in-data identifiers, they are overridden simply by replacing a prior trade table with a new one. You can learn more about [asset overrides here](/wiki/concepts/overwriting-assets)
|
||||
|
||||
Below are the currently used vanilla trade tables for each trader:
|
||||
|Trader|Path|
|
||||
|-|-|
|
||||
|Stone Mason|`BP/trading/economy_trades/stone_mason_trades.json`|
|
||||
|Farmer|`BP/trading/economy_trades/farmer_trades.json`|
|
||||
|Fisherman|`BP/trading/economy_trades/fisherman_trades.json`|
|
||||
|Butcher|`BP/trading/economy_trades/butcher_trades.json`|
|
||||
|Shepherd|`BP/trading/economy_trades/shepherd_trades.json`|
|
||||
|Leather Worker|`BP/trading/economy_trades/leather_worker_trades.json`|
|
||||
|Librarian|`BP/trading/economy_trades/librarian_trades.json`|
|
||||
|Cartographer|`BP/trading/economy_trades/cartographer_trades.json`|
|
||||
|Cleric|`BP/trading/economy_trades/cleric_trades.json`|
|
||||
|Tool Smith|`BP/trading/economy_trades/tool_smith_trades.json`|
|
||||
|Weapon Smith|`BP/trading/economy_trades/weapon_smith_trades.json`|
|
||||
|Fletcher|`BP/trading/economy_trades/fletcher_trades.json`|
|
||||
|Armorer|`BP/trading/economy_trades/armorer_trades.json`|
|
||||
|Wandering Trader|`BP/trading/economy_trades/wandering_trader_trades.json`|
|
||||
|
||||
::: tip NOTE
|
||||
Additional trade tables exist directly within the `trading` folder, but these are deprecated. Only the tables in the `economy_trades` sub-folder are currently used.
|
||||
:::
|
||||
|
||||
Alternatively, a trader entity definition can be updated to point to a new trade table location.
|
||||
在交易表中,如果未提供ID,刷怪蛋将绑定交易者的实体类型。
|
||||
|
||||
## 覆盖
|
||||
|
||||
由于交易表不使用数据内标识符,只需用新交易表替换旧表即可实现覆盖。了解更多关于[资源覆盖](/wiki/concepts/overwriting-assets)的内容。
|
||||
|
||||
以下是各交易者当前使用的原版交易表:
|
||||
|交易者|路径|
|
||||
|-|-|
|
||||
|石匠|`BP/trading/economy_trades/stone_mason_trades.json`|
|
||||
|农民|`BP/trading/economy_trades/farmer_trades.json`|
|
||||
|渔夫|`BP/trading/economy_trades/fisherman_trades.json`|
|
||||
|屠夫|`BP/trading/economy_trades/butcher_trades.json`|
|
||||
|牧羊人|`BP/trading/economy_trades/shepherd_trades.json`|
|
||||
|制革师|`BP/trading/economy_trades/leather_worker_trades.json`|
|
||||
|图书管理员|`BP/trading/economy_trades/librarian_trades.json`|
|
||||
|制图师|`BP/trading/economy_trades/cartographer_trades.json`|
|
||||
|牧师|`BP/trading/economy_trades/cleric_trades.json`|
|
||||
|工具匠|`BP/trading/economy_trades/tool_smith_trades.json`|
|
||||
|武器匠|`BP/trading/economy_trades/weapon_smith_trades.json`|
|
||||
|制箭师|`BP/trading/economy_trades/fletcher_trades.json`|
|
||||
|盔甲匠|`BP/trading/economy_trades/armorer_trades.json`|
|
||||
|流浪商人|`BP/trading/economy_trades/wandering_trader_trades.json`|
|
||||
|
||||
::: tip 注意
|
||||
`trading`文件夹中还存在其他交易表,但已弃用。目前仅使用`economy_trades`子文件夹中的表。
|
||||
:::
|
||||
|
||||
或者,可以更新交易者实体定义以指向新的交易表位置。
|
||||
Reference in New Issue
Block a user