Importare la Classe

Link to importare-la-classe

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.solarforge.InfuserManager;

Interfacce Implementate

Link to interfacce-implementate

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

Name: addJsonRecipe

Return Type: void

ZenScript
Copy
InfuserManager.addJsonRecipe(name as string, mapData as MapData) as void
ParametroTipoDescrizione
Parametro
nome
Tipo
string
Descrizione
No Description Provided
Parametro
mapData
Tipo
MapData
Descrizione
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());
ParametroTipoDescrizione
Parametro
nome
Tipo
string
Descrizione
The name of the recipe to add
Parametro
output
Tipo
IItemStack
Descrizione
The IItemStack to be outputted from the recipe.
Parametro
ings
Tipo
IIngredient[][]
Descrizione
The input IItemStacks[]. Does not support tags.
Parametro
catalysts
Tipo
Block[][]
Descrizione
The required Block catalysts that should be placed in columns in order for the recipe to craft.
Parametro
solarEnergy
Tipo
int
Descrizione
Required solar energy for recipe.
Parametro
processingTime
Tipo
int
Descrizione
The amount of time it should take the recipe to craft.
Parametro
fragment
Tipo
string
Descrizione
The id of the fragment to use.
Parametro
costs
Tipo
RunicEnergyCost
Descrizione
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
Copy
InfuserManager.getRecipeByName(name as string) as T
ParametroTipoDescrizione
Parametro
nome
Tipo
string
Descrizione
No Description Provided

Name: getRecipeMap

Return Type: T[ResourceLocation]

ZenScript
Copy
// InfuserManager.getRecipeMap() as T[ResourceLocation]

<recipetype:solarforge:infusing_new>.getRecipeMap();

Link to getRecipesByOutput

Name: getRecipesByOutput

Return Type: stdlib.List<T>

ZenScript
Copy
InfuserManager.getRecipesByOutput(output as IIngredient) as stdlib.List<T>
ParametroTipoDescrizione
Parametro
output
Tipo
IIngredient
Descrizione
No Description Provided

Name: remove

Return Type: void

ZenScript
Copy
InfuserManager.remove(output as IIngredient) as void
ParametroTipoDescrizione
Parametro
output
Tipo
IIngredient
Descrizione
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
Copy
InfuserManager.removeByInput(input as IItemStack) as void
ParametroTipoDescrizione
Parametro
input
Tipo
IItemStack
Descrizione
No Description Provided

Name: removeByModid

Return Type: void

ZenScript
Copy
InfuserManager.removeByModid(modid as string, exclude as Predicate<string>) as void
ParametroTipoDescrizioneOptionalDefaultValue
Parametro
modid
Tipo
string
Descrizione
No Description Provided
Optional
no
DefaultValue
Parametro
esclude
Tipo
Predicate<string>
Descrizione
No Description Provided
Optional
DefaultValue
(name as string) as bool => false

Name: removeByName

Return Type: void

ZenScript
Copy
InfuserManager.removeByName(name as string) as void
ParametroTipoDescrizione
Parametro
nome
Tipo
string
Descrizione
No Description Provided

Name: removeByRegex

Return Type: void

ZenScript
Copy
InfuserManager.removeByRegex(regex as string, exclude as Predicate<string>) as void
ParametroTipoDescrizioneOptionalDefaultValue
Parametro
regex
Tipo
string
Descrizione
No Description Provided
Optional
no
DefaultValue
Parametro
esclude
Tipo
Predicate<string>
Descrizione
No Description Provided
Optional
DefaultValue
(name as string) as bool => false
NomeTipoHa GetterHa SetterDescrizione
Nome
allRecipes
Tipo
stdlib.List<T>
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
recipeMap
Tipo
T[ResourceLocation]
Ha Getter
Ha Setter
no
Descrizione
No Description Provided