import crafttweaker.data.IData; import crafttweaker.item.IItemStack; // Define a function to add seed analysis recipes function addGunDevilUnbreakableGun(armorItem as IItemStack, recipeName as string) { recipes.addShapeless( recipeName, armorItem, [ (armorItem.marked("mark").transformNew(function(item) { return item.withAmount(1).withTag(item.tag); })).noReturn(), ], function(out, ins, cInfo) { var inpuTag = ins.mark.tag as IData; var updatedTag as IData = { Unbreakable: 1 as byte }; return ins.mark.updateTag(inpuTag += updatedTag).withAmount(1); }, null ); } var listOfGuns as IItemStack[] = [ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ]; // Add analysis recipes for all defined seeds for i, gunIDX in listOfGuns { addGunDevilUnbreakableGun(gunIDX, "make_gunn_unbreakable_" + i); }