InfuserManager
Link to infusermanager
导入类
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.solarforge.InfuserManager;
已实现的接口
Link to 已实现的接口
InfuserManager implements the following interfaces. That means all methods defined in these interfaces are also available in InfuserManager
使用方式
Link to 使用方式
Name: addJsonRecipe
Return Type: void
ZenScript CopyInfuserManager.addJsonRecipe(name as string, mapData as MapData) as void
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 No Description Provided |
参数 mapData | 类型 MapData #地图数据 | 描述 No Description Provided |
Name: addRecipe
Adds a new recipe to the Infuser Multiblock Setup. Some parameters have some constraints:
The input ingredients two dimensional array must have a structure like this:
Copy[ [input1, input2, input3], [input4, input5], [input6, input7, input8], [input9, input10], [input11, input12, input13] ]
So that it matches the Infuser Screen. Air can and should be used to pad out the recipe but the Array structure must match that or it will error.
The catalysts two dimensional array must have a structure like this:
Copy[ [block1, block2, block3], [block4, block5, block6], [block7, block8, block9], [block10, block11, block12] ]
The catalysts array is transposed like this:
Copy[ [North], [East], [South], [West] ]
You can find out the list of usable catalyst blocks by using the /ct dump solarforge_catalysts
command. Any other blocks that are present in the array but aren't considered a catalyst will be ignored.
You can find out possible fragment ids by using the /ct dump solarforge_fragments
command. These will be required by the player in order to be able to craft the recipe.
Return Type: void
ZenScript Copy// InfuserManager.addRecipe(name as string, output as IItemStack, ings as IIngredient[][], catalysts as Block[][], solarEnergy as int, processingTime as int, fragment as string, costs as RunicEnergyCost) as void
<recipetype:solarforge:infusing_new>.addRecipe("infuser_multiblock_test_recipe", <item:minecraft:egg>, [
[<item:minecraft:iron_ingot>,<item:minecraft:air>, <item:minecraft:stick>],
[<item:minecraft:iron_ingot>, <item:minecraft:stick>],
[<item:minecraft:air>, <item:minecraft:iron_ingot>, <item:minecraft:air>],
[<item:minecraft:stick>, <item:minecraft:iron_ingot>],
[<item:minecraft:stick>, <item:minecraft:air>, <item:minecraft:iron_ingot>]
], [
[<block:minecraft:air>, <block:solarforge:urba_rune_block>, <block:minecraft:air>],
[<block:minecraft:air>, <block:minecraft:air>, <block:minecraft:air>],
[<block:minecraft:air>, <block:solarforge:ultima_rune_block>, <block:minecraft:air>],
[<block:minecraft:air>, <block:minecraft:air>, <block:minecraft:air>],
], 0, 600, "crystals", RunicEnergyCost.EMPTY());
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 The name of the recipe to add |
参数 output(输出) | 类型 IItemstack | 描述 The IItemStack to be outputted from the recipe. |
参数 ings | 类型 IIngredient[][] | 描述 The input IItemStacks[]. Does not support tags. |
参数 catalysts | 类型 Block[][] | 描述 The required Block catalysts that should be placed in columns in order for the recipe to craft. |
参数 solarEnergy | 类型 int | 描述 Required solar energy for recipe. |
参数 processingTime | 类型 int | 描述 The amount of time it should take the recipe to craft. |
参数 fragment | 类型 string | 描述 The id of the fragment to use. |
参数 costs | 类型 RunicEnergyCost | 描述 The RunicEnergyCost this recipe has. Recipe will automatically assign itself the structure tier it needs. (If Runic energy cost > 0 tier will be Runic Energy, if solar energy > 0 tier will be Solar Energy. Solar Energy tier overrides Runic Energy tier. If both of the costs are 0, the tier will be First.). |
Name: getAllRecipes
Return Type: stdlib.List<T>
ZenScript Copy// InfuserManager.getAllRecipes() as stdlib.List<T>
<recipetype:solarforge:infusing_new>.getAllRecipes();
Name: getRecipeByName
Return Type: T
ZenScript CopyInfuserManager.getRecipeByName(name as string) as T
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 No Description Provided |
Name: getRecipeMap
Return Type: T[ResourceLocation]
ZenScript Copy// InfuserManager.getRecipeMap() as T[ResourceLocation]
<recipetype:solarforge:infusing_new>.getRecipeMap();
Name: getRecipesByOutput
Return Type: stdlib.List<T>
ZenScript CopyInfuserManager.getRecipesByOutput(output as IIngredient) as stdlib.List<T>
参数 | 类型 | 描述 |
---|---|---|
参数 output(输出) | 类型 材料(IIngredient) | 描述 No Description Provided |
Name: remove
Return Type: void
ZenScript CopyInfuserManager.remove(output as IIngredient) as void
参数 | 类型 | 描述 |
---|---|---|
参数 output(输出) | 类型 材料(IIngredient) | 描述 No Description Provided |
Name: removeAll
Return Type: void
ZenScript Copy// InfuserManager.removeAll() as void
<recipetype:solarforge:infusing_new>.removeAll();
Name: removeByInput
Return Type: void
ZenScript CopyInfuserManager.removeByInput(input as IItemStack) as void
参数 | 类型 | 描述 |
---|---|---|
参数 input(输入) | 类型 IItemstack | 描述 No Description Provided |
Name: removeByModid
Return Type: void
ZenScript CopyInfuserManager.removeByModid(modid as string, exclude as Predicate<string>) as void
参数 | 类型 | 描述 | 可选 | DefaultValue |
---|---|---|---|---|
参数 modid | 类型 string | 描述 No Description Provided | 可选 false | DefaultValue |
参数 不包含 | 类型 Predicate<string> | 描述 No Description Provided | 可选 true | DefaultValue (name as string) as bool => false |
Name: removeByName
Return Type: void
ZenScript CopyInfuserManager.removeByName(name as string) as void
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 No Description Provided |
Name: removeByRegex
Return Type: void
ZenScript CopyInfuserManager.removeByRegex(regex as string, exclude as Predicate<string>) as void
参数 | 类型 | 描述 | 可选 | DefaultValue |
---|---|---|---|---|
参数 regex | 类型 string | 描述 No Description Provided | 可选 false | DefaultValue |
参数 不包含 | 类型 Predicate<string> | 描述 No Description Provided | 可选 true | DefaultValue (name as string) as bool => false |
名称 | 类型 | 可获得 | 可设置 | 描述 |
---|---|---|---|---|
名称 allRecipes | 类型 stdlib.List<T> | 可获得 true | 可设置 false | 描述 No Description Provided |
名称 recipeMap | 类型 T[ResourceLocation] | 可获得 true | 可设置 false | 描述 No Description Provided |