ServerEvents.recipes(event => {
    let resurvitem_from_tool = (tool, source, result, resultNum) => {
        event.recipes.kubejs.shapeless(Item.of(result, resultNum), // arg 1: output
            [
                tool,
                source
            ]
        )
        .damageIngredient(tool,60)
    }
  
    //Now we can make many 'resurvitem' recipes without typing that huge block over and over!
    resurvitem_from_tool('#minecraft:axes', '#minecraft:logs', 'minecraft:stick', 2)
    resurvitem_from_tool('#minecraft:pickaxes', '#minecraft:stone_crafting_materials', 'minecraft:flint', 2)
    resurvitem_from_tool('#minecraft:shovels', 'minecraft:gravel', 'minecraft:flint', 2)
    resurvitem_from_tool('#minecraft:swords', '#minecraft:wool', 'minecraft:string', 4)
})