Trying to make a script to add items to an array for hiding/tag removal using forEachRecipe and input checks right now but it's still showing up with items that have recipes, so I am wondering if I can do this another way by checking if a specific item DOES have a recipe and query ingredients?
current code:
ServerEvents.recipes(event => {
let finalarray = []
event.forEachRecipe({output: /nuclear.*/}, r => {
let ingredients = r.originalRecipeIngredients
let output = Item.of(r.originalRecipeResult).id
if((ingredients.length == 0) && (output != Item.of("minecraft:air", 0) && output.includes("nuclearcraft"))) {
console.log("ingredients: " + ingredients)
console.log("output: " + output)
finalarray.push(output)
}
})
console.log(finalarray)
})```