Sawmill
Link to sawmill
Allows you to add or remove Sawmill recipes.
Sawmill Recipes consist of an input, an optional, intermediate "stripped" output and a "cut" output.
Each step (stripping and sawing) have possible secondary outputs. These won't be returned through the conveyor belt, but through the item output to the front, right next to the sawblade.
Importare la Classe
Link to importare-la-classe
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport mods.immersiveengineering.Sawmill;
Interfacce Implementate
Link to interfacce-implementate
Sawmill implements the following interfaces. That means all methods defined in these interfaces are also available in Sawmill
Metodi
Link to metodi
Name: addJsonRecipe
ZenScript CopySawmill.addJsonRecipe(name as string, mapData as MapData)
Parametro | Tipo |
---|---|
Parametro nome | Tipo string |
Parametro mapData | Tipo MapData |
Name: addRecipe
Adds a sawmill recipe. This method is a shorter version for recipes that do not require stripping. Note that recipes without an intermediate item will do nothing if the sawmill has no sawblade.
ZenScript Copy// Sawmill.addRecipe(recipePath as string, input as IIngredient, energy as int, output as IItemStack, outputSecondaries as IItemStack[])
<recipetype:immersiveengineering:sawmill>.addRecipe("splitting_bones", <item:minecraft:bone_block>, 1000, <item:minecraft:bone> * 5, [<item:minecraft:bone_meal> * 2]);
Parametro | Tipo | Descrizione |
---|---|---|
Parametro recipePath | Tipo string | Descrizione The recipe name, without the resource location |
Parametro input | Tipo IIngredient | Descrizione The item input |
Parametro energy | Tipo int | Descrizione The total energy required |
Parametro output | Tipo IItemStack | Descrizione The item that is returned |
Parametro outputSecondaries | Tipo IItemStack[] | Descrizione The secondary outputs that are created alongside the output item |
Name: addRecipe
Adds a sawmill recipe.
Note that the recipe only works from start to final output.
So if you remove the sawblade to get the intermediate item, you need a 2nd recipe starting from the intermediate item if you later want to process that item.
ZenScript Copy// Sawmill.addRecipe(recipePath as string, input as IIngredient, energy as int, strippedOutput as IItemStack, strippedOutputSecondaries as IItemStack[], output as IItemStack, outputSecondaries as IItemStack[])
<recipetype:immersiveengineering:sawmill>.addRecipe("shredding_seeds", <tag:minecraft:saplings>, 1200, <item:minecraft:dead_bush>, [<item:minecraft:grass>], <item:minecraft:stick> * 2, [<item:immersiveengineering:dust_wood>]);
Parametro | Tipo | Descrizione |
---|---|---|
Parametro recipePath | Tipo string | Descrizione The recipe name, without the resource location |
Parametro input | Tipo IIngredient | Descrizione The item input |
Parametro energy | Tipo int | Descrizione The total energy required |
Parametro strippedOutput | Tipo IItemStack | Descrizione The intermediate Stripped output. Will be returned if no sawblade is present |
Parametro strippedOutputSecondaries | Tipo IItemStack[] | Descrizione The secondary outputs that are created while stripping. Must be empty if no intermediate output was provided. |
Parametro output | Tipo IItemStack | Descrizione The output that is returned when a sawblade is present |
Parametro outputSecondaries | Tipo IItemStack[] | Descrizione The secondary outputs that are created alongside the output item |
Name: getAllRecipes
Return Type: stdlib.List<T>
ZenScript Copy// Sawmill.getAllRecipes() as stdlib.List<T>
<recipetype:immersiveengineering:sawmill>.getAllRecipes();
Name: getRecipeByName
Return Type: T
ZenScript CopySawmill.getRecipeByName(name as string) as T
Parametro | Tipo |
---|---|
Parametro nome | Tipo string |
Name: getRecipeMap
Return Type: T[ResourceLocation]
ZenScript Copy// Sawmill.getRecipeMap() as T[ResourceLocation]
<recipetype:immersiveengineering:sawmill>.getRecipeMap();
Name: getRecipesByOutput
Return Type: stdlib.List<T>
ZenScript CopySawmill.getRecipesByOutput(output as IIngredient) as stdlib.List<T>
Parametro | Tipo |
---|---|
Parametro output | Tipo IIngredient |
Name: removeAll
ZenScript Copy// Sawmill.removeAll()
<recipetype:immersiveengineering:sawmill>.removeAll();
Name: removeByInput
ZenScript CopySawmill.removeByInput(input as IItemStack)
Parametro | Tipo |
---|---|
Parametro input | Tipo IItemStack |
Name: removeByModid
ZenScript CopySawmill.removeByModid(modid as string, exclude as Predicate<string>)
Parametro | Tipo | Optional | Default Value |
---|---|---|---|
Parametro modid | Tipo string | Optional no | Default Value |
Parametro esclude | Tipo Predicate<string> | Optional sì | Default Value (name as string) as bool => false |
Name: removeByName
ZenScript CopySawmill.removeByName(names as string[])
Parametro | Tipo |
---|---|
Parametro names | Tipo string[] |
Name: removeByRegex
ZenScript CopySawmill.removeByRegex(regex as string, exclude as Predicate<string>)
Parametro | Tipo | Optional | Default Value |
---|---|---|---|
Parametro regex | Tipo string | Optional no | Default Value |
Parametro esclude | Tipo Predicate<string> | Optional sì | Default Value (name as string) as bool => false |
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter |
---|---|---|---|
Nome allRecipes | Tipo stdlib.List<T> | Ha Getter sì | Ha Setter no |
Nome recipeMap | Tipo T[ResourceLocation] | Ha Getter sì | Ha Setter no |