/* SevTech: Ages Table Industrial Loom Recipes Script This script handles custom integration control to a mod. Note: These scripts are created and for the usage in SevTech: Ages and other modpacks curated by DarkPacks. You can use these scripts for reference and for learning but not for copying and pasting and claiming as your own. */ import crafttweaker.item.IItemStack; import crafttweaker.oredict.IOreDictEntry; import mods.modularmachinery.RecipeBuilder; import mods.modularmachinery.RecipePrimer; import scripts.crafttweaker.utils; /* Helper function to create a Looming Recipe for the MM Machine. */ function createLoomingRecipe(name as string, output as IItemStack, inputs as IItemStack[]) { var machineName = "industrial_loom"; var builder as RecipePrimer = RecipeBuilder.newBuilder(utils.createRecipeName(machineName, name), machineName, 128); builder.addEnergyPerTickInput(150); // Set the power input. builder.addItemOutput(output); // Set the output item. for input in inputs { // Loop over the inputs and add them to the builder. builder.addItemInput(input); } builder.build(); // Build the recipe. } function createOreLoomingRecipe(name as string, output as IItemStack, inputs as IOreDictEntry[int]) { var machineName = "industrial_loom"; var builder as RecipePrimer = RecipeBuilder.newBuilder(utils.createRecipeName(machineName, name), machineName, 128); builder.addEnergyPerTickInput(4); // Set the power input. builder.addItemOutput(output); // Set the output item. for amount, input in inputs { // Loop over the inputs and add them to the builder. builder.addItemInput(input, amount); } builder.build(); // Build the recipe. } function init() { /* Ore Based Recipes */ createOreLoomingRecipe("string", , { 2: }); createOreLoomingRecipe("hemp_cloth", , { 9: }); /* Standard Recipes */ createLoomingRecipe("plant_twine", , [ * 3 ]); createLoomingRecipe("leather_strip", * 9, [ ]); createLoomingRecipe("cineris_twine", , [ * 3 ]); createLoomingRecipe("cobweb", , [ * 4, * 5 ]); /* Wool Looming */ for i in 0 to 16 { createLoomingRecipe("wool_" ~ i, .definition.makeStack(i), [ .definition.makeStack(i) * 4, ]); } }