Refinery
Link to refinery
Allows you to add or remove Refinery recipes.
Refinery Recipes consist of two fluid inputs and a fluid output.
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 Copyimport mods.immersiveengineering.Refinery;
Interfacce Implementate
Link to interfacce-implementate
Refinery implements the following interfaces. That means all methods defined in these interfaces are also available in Refinery
Metodi
Link to metodi
Name: addJsonRecipe
ZenScript CopyRefinery.addJsonRecipe(name as string, mapData as MapData)
Parametro | Tipo |
---|---|
Parametro nome | Tipo string |
Parametro mapData | Tipo MapData |
Name: addRecipe
Adds a recipe to the Refinery. Make sure that the provided Tags are valid fluid tags.
ZenScript CopyRefinery.addRecipe(recipePath as string, fluidInput1 as Many<MCTag>, fluidInput2 as Many<MCTag>, catalyst as IIngredient, energy as int, output as IFluidStack)
Parametro | Tipo | Descrizione |
---|---|---|
Parametro recipePath | Tipo string | Descrizione The recipe name, without the resource location |
Parametro fluidInput1 | Tipo Many<MCTag> | Descrizione The first fluid input, as Tag |
Parametro fluidInput2 | Tipo Many<MCTag> | Descrizione The second fluid input, as Tag |
Parametro catalyst | Tipo IIngredient | Descrizione The catalyst of the recipe |
Parametro energy | Tipo int | Descrizione The total energy required |
Parametro output | Tipo IFluidStack | Descrizione The output fluid |
Name: getAllRecipes
Return Type: stdlib.List<T>
ZenScript Copy// Refinery.getAllRecipes() as stdlib.List<T>
<recipetype:immersiveengineering:refinery>.getAllRecipes();
Name: getRecipeByName
Return Type: T
ZenScript CopyRefinery.getRecipeByName(name as string) as T
Parametro | Tipo |
---|---|
Parametro nome | Tipo string |
Name: getRecipeMap
Return Type: T[ResourceLocation]
ZenScript Copy// Refinery.getRecipeMap() as T[ResourceLocation]
<recipetype:immersiveengineering:refinery>.getRecipeMap();
Name: getRecipesByOutput
Return Type: stdlib.List<T>
ZenScript CopyRefinery.getRecipesByOutput(output as IIngredient) as stdlib.List<T>
Parametro | Tipo |
---|---|
Parametro output | Tipo IIngredient |
Name: removeAll
ZenScript Copy// Refinery.removeAll()
<recipetype:immersiveengineering:refinery>.removeAll();
Name: removeByInput
ZenScript CopyRefinery.removeByInput(input as IItemStack)
Parametro | Tipo |
---|---|
Parametro input | Tipo IItemStack |
Name: removeByModid
ZenScript CopyRefinery.removeByModid(modid as string, exclude as Predicate<string>)
Parametro | Tipo | Optional | Default Value |
---|---|---|---|
Parametro modid | Tipo string | Optional no | Default Value |
Parametro esclude | Tipo Predicate<string> | Optional sì | Default Value (name as string) as bool => false |
Name: removeByName
ZenScript CopyRefinery.removeByName(names as string[])
Parametro | Tipo |
---|---|
Parametro names | Tipo string[] |
Name: removeByRegex
ZenScript CopyRefinery.removeByRegex(regex as string, exclude as Predicate<string>)
Parametro | Tipo | Optional | Default Value |
---|---|---|---|
Parametro regex | Tipo string | Optional no | Default Value |
Parametro esclude | Tipo Predicate<string> | Optional sì | Default Value (name as string) as bool => false |
Name: removeRecipe
Removes all recipes that return this given fluid. Since it's only the fluid, it does not check amounts.
ZenScript Copy// Refinery.removeRecipe(fluid as Fluid)
<recipetype:immersiveengineering:refinery>.removeRecipe(<fluid:immersiveengineering:biodiesel>.fluid);
Parametro | Tipo | Descrizione |
---|---|---|
Parametro fluid | Tipo Fluid | Descrizione The fluid output to remove |
Name: removeRecipe
Removes all recipes that return this given fluid Stack. Only removes if the fluid and the fluid amount match.
ZenScript Copy// Refinery.removeRecipe(fluidStack as IFluidStack)
<recipetype:immersiveengineering:refinery>.removeRecipe(<fluid:immersiveengineering:biodiesel> * 16);
Parametro | Tipo | Descrizione |
---|---|---|
Parametro fluidStack | Tipo IFluidStack | Descrizione The output to remove |
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter |
---|---|---|---|
Nome allRecipes | Tipo stdlib.List<T> | Ha Getter sì | Ha Setter no |
Nome recipeMap | Tipo T[ResourceLocation] | Ha Getter sì | Ha Setter no |