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
Copy
import 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

Name: addJsonRecipe

ZenScript
Copy
Sawmill.addJsonRecipe(name as string, mapData as MapData)
ParametroTipo
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]);
ParametroTipoDescrizione
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>]);
ParametroTipoDescrizione
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
Copy
Sawmill.getRecipeByName(name as string) as T
ParametroTipo
Parametro
nome
Tipo
string

Name: getRecipeMap

Return Type: T[ResourceLocation]

ZenScript
Copy
// Sawmill.getRecipeMap() as T[ResourceLocation]

<recipetype:immersiveengineering:sawmill>.getRecipeMap();

Link to getRecipesByOutput

Name: getRecipesByOutput

Return Type: stdlib.List<T>

ZenScript
Copy
Sawmill.getRecipesByOutput(output as IIngredient) as stdlib.List<T>
ParametroTipo
Parametro
output
Tipo
IIngredient

Name: removeAll

ZenScript
Copy
// Sawmill.removeAll()

<recipetype:immersiveengineering:sawmill>.removeAll();

Name: removeByInput

ZenScript
Copy
Sawmill.removeByInput(input as IItemStack)
ParametroTipo
Parametro
input
Tipo
IItemStack

Name: removeByModid

ZenScript
Copy
Sawmill.removeByModid(modid as string, exclude as Predicate<string>)
ParametroTipoOptionalDefault Value
Parametro
modid
Tipo
string
Optional
no
Default Value
Parametro
esclude
Tipo
Predicate<string>
Optional
Default Value
(name as string) as bool => false

Name: removeByName

ZenScript
Copy
Sawmill.removeByName(names as string[])
ParametroTipo
Parametro
names
Tipo
string[]

Name: removeByRegex

ZenScript
Copy
Sawmill.removeByRegex(regex as string, exclude as Predicate<string>)
ParametroTipoOptionalDefault Value
Parametro
regex
Tipo
string
Optional
no
Default Value
Parametro
esclude
Tipo
Predicate<string>
Optional
Default Value
(name as string) as bool => false
NomeTipoHa GetterHa Setter
Nome
allRecipes
Tipo
stdlib.List<T>
Ha Getter
Ha Setter
no
Nome
recipeMap
Tipo
T[ResourceLocation]
Ha Getter
Ha Setter
no