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.

Importing the class

Link to importing-the-class

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;

Implemented Interfaces

Link to implemented-interfaces

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)
ParameterType
Parameter
name
Type
string
Parameter
mapData
Type
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]);
ParameterTypeDescription
Parameter
recipePath
Type
string
Description
The recipe name, without the resource location
Parameter
input
Type
IIngredient
Description
The item input
Parameter
energy
Type
int
Description
The total energy required
Parameter
output
Type
IItemStack
Description
The item that is returned
Parameter
outputSecondaries
Type
IItemStack[]
Description
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>]);
ParameterTypeDescription
Parameter
recipePath
Type
string
Description
The recipe name, without the resource location
Parameter
input
Type
IIngredient
Description
The item input
Parameter
energy
Type
int
Description
The total energy required
Parameter
strippedOutput
Type
IItemStack
Description
The intermediate Stripped output. Will be returned if no sawblade is present
Parameter
strippedOutputSecondaries
Type
IItemStack[]
Description
The secondary outputs that are created while stripping. Must be empty if no intermediate output was provided.
Parameter
output
Type
IItemStack
Description
The output that is returned when a sawblade is present
Parameter
outputSecondaries
Type
IItemStack[]
Description
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
ParameterType
Parameter
name
Type
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>
ParameterType
Parameter
output
Type
IIngredient

Name: removeAll

ZenScript
Copy
// Sawmill.removeAll()

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

Name: removeByInput

ZenScript
Copy
Sawmill.removeByInput(input as IItemStack)
ParameterType
Parameter
input
Type
IItemStack

Name: removeByModid

ZenScript
Copy
Sawmill.removeByModid(modid as string, exclude as Predicate<string>)
ParameterTypeOptionalDefault Value
Parameter
modid
Type
string
Optional
false
Default Value
Parameter
wyklucz
Type
Predicate<string>
Optional
true
Default Value
(name as string) as bool => false

Name: removeByName

ZenScript
Copy
Sawmill.removeByName(names as string[])
ParameterType
Parameter
names
Type
string[]

Name: removeByRegex

ZenScript
Copy
Sawmill.removeByRegex(regex as string, exclude as Predicate<string>)
ParameterTypeOptionalDefault Value
Parameter
regex
Type
string
Optional
false
Default Value
Parameter
wyklucz
Type
Predicate<string>
Optional
true
Default Value
(name as string) as bool => false
NameTypeHas GetterHas Setter
Name
allRecipes
Type
stdlib.List<T>
Has Getter
true
Has Setter
false
Name
recipeMap
Type
T[ResourceLocation]
Has Getter
true
Has Setter
false