import crafttweaker.data.IData; import crafttweaker.item.IItemStack; recipes.addShaped(, [[, , ], [, .reuse(), ], [, , ]]); // Add recipe for Portable Seed Analyzer recipes.addShaped(, [[, , ], [, , ], [, , ]]); // Define a function to add seed analysis recipes function addPaleMetalUnbreakableArmor(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 ); } // Define all seeds that need analysis recipes var armorToUnbreakify as IItemStack[] = [ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ]; // Add analysis recipes for all defined seeds for i, armourinlist in armorToUnbreakify { addPaleMetalUnbreakableArmor(armourinlist, "make_armor_unbreakable_" + i); }