Skip to content

锻造配方 (Smithing Recipe) ​

锻造配方支持两种子类型:改造 (Transform) 和纹饰 (Trim)。

改造配方 (Transform) ​

用于升级装备,如将钻石装备升级为下界合金装备。

YAML 示例 ​

yaml
type: 'vanilla_smithing_transform'
result: 'minecraft:netherite_sword'
base: 'minecraft:diamond_sword'
addition: 'minecraft:netherite_ingot'
template: 'minecraft:netherite_upgrade_smithing_template'

字段说明 ​

字段类型必填说明
typestring是固定为 vanilla_smithing_transform
resultstring是产出物品 ID
basestring是基础物品(被升级的物品)
additionstring是添加材料
templatestring是锻造模板 (1.20+)
copy_components_ruleslist否组件复制规则
fake_result_previewstring否合成时显示的虚假预览物品

组件复制规则 (copy_components_rules) ​

注意:推荐使用新的 result_processors 配置项,它提供了更强大的功能。旧的 copy_components_rules 语法仍然兼容。详见 结果处理器。

指定从基础物品复制哪些组件到产出物品:

规则说明
all复制所有组件
enchantments附魔
attributes属性
display_name显示名称
custom_model_data自定义模型数据
custom_model_data_component自定义模型数据组件 (1.20.5+)
food食物属性
item_flag物品标志
lore说明文本
max_stack_size最大堆叠数
rarity稀有度
tool工具属性
fire_resistance防火
hide_tooltip隐藏提示
unbreakable不可破坏
trim纹饰
item_model物品模型
item_name物品名称
custom_persistent_data自定义持久数据

纹饰配方 (Trim) ​

用于为装备添加装饰性纹饰,需要 1.20+ 版本。

纹饰配方无法设置配方结果,也就是result配置项

YAML 示例 ​

yaml
type: 'vanilla_smithing_trim'
base: 'minecraft:diamond_chestplate'
addition: 'minecraft:iron_ingot'
template: 'minecraft:coast_armor_trim_smithing_template'
trim_pattern: 'minecraft:eye' #1.21.5及以上,必须设定trim_pattern, 否则无法注册配方

字段说明 ​

字段类型必填说明
typestring是固定为 vanilla_smithing_trim
basestring是被纹饰的装备
additionstring是纹饰材料
templatestring是纹饰模板
fake_result_previewstring否合成时显示的虚假预览物品

基于 GPL-3.0 许可证发布