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.
导入类
Link to 导入类
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;
已实现的接口
Link to 已实现的接口
Sawmill implements the following interfaces. That means all methods defined in these interfaces are also available in Sawmill
使用方式
Link to 使用方式
Name: addJsonRecipe
ZenScript CopySawmill.addJsonRecipe(name as string, mapData as MapData)
参数 | 类型 |
---|---|
参数 name(名称) | 类型 string |
参数 mapData | 类型 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]);
参数 | 类型 | 描述 |
---|---|---|
参数 recipePath | 类型 string | 描述 The recipe name, without the resource location |
参数 input(输入) | 类型 材料(IIngredient) | 描述 The item input |
参数 energy | 类型 int | 描述 The total energy required |
参数 output(输出) | 类型 IItemstack | 描述 The item that is returned |
参数 outputSecondaries | 类型 IItemStack[] | 描述 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>]);
参数 | 类型 | 描述 |
---|---|---|
参数 recipePath | 类型 string | 描述 The recipe name, without the resource location |
参数 input(输入) | 类型 材料(IIngredient) | 描述 The item input |
参数 energy | 类型 int | 描述 The total energy required |
参数 strippedOutput | 类型 IItemstack | 描述 The intermediate Stripped output. Will be returned if no sawblade is present |
参数 strippedOutputSecondaries | 类型 IItemStack[] | 描述 The secondary outputs that are created while stripping. Must be empty if no intermediate output was provided. |
参数 output(输出) | 类型 IItemstack | 描述 The output that is returned when a sawblade is present |
参数 outputSecondaries | 类型 IItemStack[] | 描述 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
参数 | 类型 |
---|---|
参数 name(名称) | 类型 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>
参数 | 类型 |
---|---|
参数 output(输出) | 类型 材料(IIngredient) |
Name: removeAll
ZenScript Copy// Sawmill.removeAll()
<recipetype:immersiveengineering:sawmill>.removeAll();
Name: removeByInput
ZenScript CopySawmill.removeByInput(input as IItemStack)
参数 | 类型 |
---|---|
参数 input(输入) | 类型 IItemstack |
Name: removeByModid
ZenScript CopySawmill.removeByModid(modid as string, exclude as Predicate<string>)
参数 | 类型 | 可选 | 默认值 |
---|---|---|---|
参数 modid | 类型 string | 可选 false | 默认值 |
参数 不包含 | 类型 Predicate<string> | 可选 true | 默认值 (name as string) as bool => false |
Name: removeByName
ZenScript CopySawmill.removeByName(names as string[])
参数 | 类型 |
---|---|
参数 names | 类型 string[] |
Name: removeByRegex
ZenScript CopySawmill.removeByRegex(regex as string, exclude as Predicate<string>)
参数 | 类型 | 可选 | 默认值 |
---|---|---|---|
参数 regex | 类型 string | 可选 false | 默认值 |
参数 不包含 | 类型 Predicate<string> | 可选 true | 默认值 (name as string) as bool => false |
名称 | 类型 | 可获得 | 可设置 |
---|---|---|---|
名称 allRecipes | 类型 stdlib.List<T> | 可获得 true | 可设置 false |
名称 recipeMap | 类型 T[ResourceLocation] | 可获得 true | 可设置 false |