//用于控制纹饰相关的改造
TetraJSEvents.workbenchCraft(event => {
    return
    let { player, level, currentSchematic, currentSlot, targetStack, upgradedStack, materials } = event;
    if (!player || !player.getServer()) return;
    if (currentSchematic.key == 'armor/shared/armor/trim_smithing_template/trim_smithing_template') {
        let trim_smithing_template = materials[0].id.split(':')[1]
        let smithing_template_materials = materials[1].id.split(':')[1]
        let slot_module = upgradedStack.getItem().getModuleFromSlot(upgradedStack, currentSlot)
        
        //移除纹饰原材料
        remove_improvement(upgradedStack, 'smithing_template_materials/' + smithing_template_materials, true, slot_module)
        //加上所选锻造模板对应的improvement
        slot_module.addImprovement(upgradedStack, currentSlot + '/' + trim_smithing_template + '/' + smithing_template_materials, 0);
    }
})