Home Commands Examples Getting Started With Scripts Global Keywords
Generic JSON Recipes

InfuserManager

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.

script.zs
import mods.solarforge.InfuserManager;

Implemented Interfaces

InfuserManager implements the following interfaces. That means all methods defined in these interfaces are also available in InfuserManager

Methods

Return Type: void

script.zs
InfuserManager.addJsonRecipe(name as string, mapData as MapData) as void
ParameterTypeDescription
Parameter
name
Type
string
Description
No Description Provided
Parameter
mapData
Type
MapData
Description
No Description Provided

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:

script.zs
[
[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:

script.zs
[
[block1, block2, block3],
[block4, block5, block6],
[block7, block8, block9],
[block10, block11, block12]
]

The catalysts array is transposed like this:

script.zs
[
[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

script.zs
// 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());
ParameterTypeDescription
Parameter
name
Type
string
Description
The name of the recipe to add
Parameter
output
Type
IItemStack
Description
The IItemStack to be outputted from the recipe.
Parameter
ings
Type
IIngredient[][]
Description
The input IItemStacks[]. Does not support tags.
Parameter
catalysts
Type
Block[][]
Description
The required Block catalysts that should be placed in columns in order for the recipe to craft.
Parameter
solarEnergy
Type
int
Description
Required solar energy for recipe.
Parameter
processingTime
Type
int
Description
The amount of time it should take the recipe to craft.
Parameter
fragment
Type
string
Description
The id of the fragment to use.
Parameter
costs
Type
RunicEnergyCost
Description
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.).

Return Type: stdlib.List<T>

script.zs
// InfuserManager.getAllRecipes() as stdlib.List<T>
<recipetype:solarforge:infusing_new>.getAllRecipes();

Return Type: T

script.zs
InfuserManager.getRecipeByName(name as string) as T
ParameterTypeDescription
Parameter
name
Type
string
Description
No Description Provided

Return Type: T[ResourceLocation]

script.zs
// InfuserManager.getRecipeMap() as T[ResourceLocation]
<recipetype:solarforge:infusing_new>.getRecipeMap();

Return Type: stdlib.List<T>

script.zs
InfuserManager.getRecipesByOutput(output as IIngredient) as stdlib.List<T>
ParameterTypeDescription
Parameter
output
Type
IIngredient
Description
No Description Provided

Return Type: void

script.zs
InfuserManager.remove(output as IIngredient) as void
ParameterTypeDescription
Parameter
output
Type
IIngredient
Description
No Description Provided

Return Type: void

script.zs
// InfuserManager.removeAll() as void
<recipetype:solarforge:infusing_new>.removeAll();

Return Type: void

script.zs
InfuserManager.removeByInput(input as IItemStack) as void
ParameterTypeDescription
Parameter
input
Type
IItemStack
Description
No Description Provided

Return Type: void

script.zs
InfuserManager.removeByModid(modid as string, exclude as Predicate<string>) as void
ParameterTypeDescriptionOptionalDefaultValue
Parameter
modid
Type
string
Description
No Description Provided
Optional
false
DefaultValue
Parameter
exclude
Type
Predicate<string>
Description
No Description Provided
Optional
true
DefaultValue
(name as string) as bool => false

Return Type: void

script.zs
InfuserManager.removeByName(name as string) as void
ParameterTypeDescription
Parameter
name
Type
string
Description
No Description Provided

Return Type: void

script.zs
InfuserManager.removeByRegex(regex as string, exclude as Predicate<string>) as void
ParameterTypeDescriptionOptionalDefaultValue
Parameter
regex
Type
string
Description
No Description Provided
Optional
false
DefaultValue
Parameter
exclude
Type
Predicate<string>
Description
No Description Provided
Optional
true
DefaultValue
(name as string) as bool => false

Properties

NameTypeHas GetterHas SetterDescription
Name
allRecipes
Type
stdlib.List<T>
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
recipeMap
Type
T[ResourceLocation]
Has Getter
true
Has Setter
false
Description
No Description Provided