I'm having issues with a tag that when I get the item from it, I get the wrong item, in this case, I get the industrialforegoing gear when I need the thermal series one
ServerEvents.recipes(event => {
const gears = event.findRecipes({output: "#forge:gears"})
const ingots = Ingredient.of("#forge:ingots").itemIds
const metals = []
ingots.forEach((ingot, index) => {
var metal = ingot.match(/:(.*?)(_|$)/)
metals.push(metal[1])
})
gears.forEach(gear => {
event.remove({id: gear.getOriginalRecipe().getId()})
})
metals.forEach((metal,index) => {
//console.log(metal ,index)
console.log(Item.of(`#forge:gears/${metal}`))
try {
event.recipes.create.deploying(Item.of(`#forge:gears/${metal}`).getId(), [ingots[index], "thermal:press_gear_die"]).keepHeldItem()
//addDeployCraftByTag(ingot, "thermal:press_gear_die", `#forge:gears/${metal[1]}`)
} catch(err) {
console.error("not possible to create gear recipe with: " + metal)
}
})
})```