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.
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.
Implemented Interfaces
Sawmill implements the following interfaces. That means all methods defined in these interfaces are also available in Sawmill
Methods
Parameter | Type |
---|---|
Parameter name | Type string |
Parameter mapData | Type MapData |
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.
Parameter | Type | Description |
---|---|---|
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 |
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.
Parameter | Type | Description |
---|---|---|
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 |
Return Type: stdlib.List<T>
Return Type: T
Parameter | Type |
---|---|
Parameter name | Type string |
Return Type: T[ResourceLocation]
Return Type: stdlib.List<T>
Parameter | Type |
---|---|
Parameter output | Type IIngredient |
Parameter | Type |
---|---|
Parameter input | Type IItemStack |
Parameter | Type | Optional | Default Value |
---|---|---|---|
Parameter modid | Type string | Optional false | Default Value |
Parameter exclude | Type Predicate<string> | Optional true | Default Value (name as string) as bool => false |
Parameter | Type |
---|---|
Parameter names | Type string[] |
Parameter | Type | Optional | Default Value |
---|---|---|---|
Parameter regex | Type string | Optional false | Default Value |
Parameter exclude | Type Predicate<string> | Optional true | Default Value (name as string) as bool => false |
Properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name allRecipes | Type stdlib.List<T> | Has Getter true | Has Setter false |
Name recipeMap | Type T[ResourceLocation] | Has Getter true | Has Setter false |