import crafttweaker.data.IData; import crafttweaker.item.IItemStack; recipes.addShaped(, [[, , ], [, .reuse(), ], [, , ]]); 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[] = [ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , .withTag({astralsorcery: {constellationName: "astralsorcery.constellation.lucerna"}}), .withTag({astralsorcery: {constellationName: "astralsorcery.constellation.vicio"}}), .withTag({astralsorcery: {constellationName: "astralsorcery.constellation.armara"}}), .withTag({astralsorcery: {constellationName: "astralsorcery.constellation.pelotrio"}}), .withTag({astralsorcery: {constellationName: "astralsorcery.constellation.discidia"}}), .withTag({astralsorcery: {constellationName: "astralsorcery.constellation.horologium"}}), .withTag({astralsorcery: {constellationName: "astralsorcery.constellation.octans"}}), .withTag({astralsorcery: {constellationName: "astralsorcery.constellation.aevitas"}}), .withTag({astralsorcery: {constellationName: "astralsorcery.constellation.evorsio"}}), .withTag({astralsorcery: {constellationName: "astralsorcery.constellation.mineralis"}}), .withTag({astralsorcery: {constellationName: "astralsorcery.constellation.bootes"}}), .withTag({astralsorcery: {constellationName: "astralsorcery.constellation.fornax"}}), .withTag({astralsorcery: {}}) ]; // Add analysis recipes for all defined seeds for i, armourinlist in armorToUnbreakify { addPaleMetalUnbreakableArmor(armourinlist, "make_armor_unbreakable_" + i); }