#Does `.modifyResult()` work with Smithing recipes?
12 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
works with all vanilla recipes
it works the same way with any recipe
theres no difference
onEvent('recipes', event => {
const armors = ['minecraft:leather', 'minecraft:chainmail', 'minecraft:iron', 'minecraft:diamond', 'minecraft:netherite', 'mekanismtools:refined_obsidian', 'forbidden_arcanus:draco_arcanus', 'forbidden_arcanus:tyr'];
const material = ['minecraft:iron_ingot', 'minecraft:iron_block', 'minecraft:diamond_block', 'minecraft:netherite_ingot', 'mekanism:block_refined_obsidian', 'kubejs:draco_arcanus_plate', 'kubejs:tyr_plate']
for (let i = 0; i < armors.length - 1; i++) {
let currentArmor = armors[i]
if (i == 7) return
let nextArmor = armors[i + 1]
addArmorUpgradeRecipe(event, currentArmor, nextArmor, material[i])
}
})
function addArmorUpgradeRecipe(event, currentArmor, nextArmor, upgradeItem) {
const armorTypes = ['helmet', 'chestplate', 'leggings', 'boots']
armorTypes.forEach(armor => {
let currentItem = `${currentArmor}_${armor}`
let nextItem = `${nextArmor}_${armor}`
event.smithing(nextItem, currentItem, upgradeItem)
})
}``` That's the code I'm working with. I need to keep the input item's nbt to the result, like enchantments and durability. As the code is right now if the item has nbt, it won't work
I've heard somewhere it's not working correctly
let me see
ah i dont know how to keep the nbt 
It's okay