sorry, its quite a bit. It worked when i was using smithing recipes but when i decided to switch over to anvil recipes due to a technical issue it broke
let anvilRecipe = (output, item, additive, amount) => {
e.custom({
"type": "lychee:anvil_crafting",
"item_in": [
{
"item": item
},
{
"item": additive
}
],
"item_out": {
"item": output
},
"level_cost": 0,
"material_cost": amount
})
}
let smartSmithing = (outputSuffix, item, materialAmount, tierName, tierMaterial, modName) => {
anvilRecipe(modName + ":" + tierName + outputSuffix, item, tierMaterial, materialAmount)
}
let simpleSwordSmithing
let materialTier = (tierName, tierMaterial) => {
smartSmithing("_helmet", "minecraft:leather_helmet", 5, tierName, tierMaterial, "minecraft")
smartSmithing("_chestplate", "minecraft:leather_chestplate", 8, tierName, tierMaterial, "minecraft")
smartSmithing("_leggings", "minecraft:leather_leggings", 7, tierName, tierMaterial, "minecraft")
smartSmithing("_boots", "minecraft:leather_boots", 4, tierName, tierMaterial, "minecraft")
smartSmithing("_sword", "kubejs:handle", 2, tierName, tierMaterial, "minecraft")
smartSmithing("_shovel", "2x kubejs:handle", 1, tierName, tierMaterial, "minecraft")
smartSmithing("_pickaxe", "2x kubejs:handle", 3, tierName, tierMaterial, "minecraft")
smartSmithing("_axe", "2x kubejs:handle", 3, tierName, tierMaterial, "minecraft")
smartSmithing("_hoe", "2x kubejs:handle", 2, tierName, tierMaterial, "minecraft")
}
materialTier("iron", "minecraft:iron_ingot", "minecraft")