Home Commands Examples Getting Started With Scripts Global Keywords
Generic Recipe Manipulation

DragonForgeRecipeManager

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.iceandfire.recipe.DragonForgeRecipeManager;

Implemented Interfaces

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

Methods

Adds a new Fire Dragon Forge recipe.

script.zs
// DragonForgeRecipeManager.addFireRecipe(name as string, output as IItemStack, input as IIngredient, blood as IIngredient, cookTime as int)
<recipetype:iceandfire:dragonforge>.addFireRecipe("fire_test", <item:minecraft:diamond>, <item:minecraft:dirt>, <item:minecraft:apple>, 200);
ParameterTypeDescription
Parameter
name
Type
string
Description
The name of the recipe
Parameter
output
Type
IItemStack
Description
The output item
Parameter
input
Type
IIngredient
Description
The input Ingredient
Parameter
blood
Type
IIngredient
Description
The blood Ingredient
Parameter
cookTime
Type
int
Description
The cook time of the recipe

Adds a new Ice Dragon Forge recipe.

script.zs
// DragonForgeRecipeManager.addIceRecipe(name as string, output as IItemStack, input as IIngredient, blood as IIngredient, cookTime as int)
<recipetype:iceandfire:dragonforge>.addIceRecipe("ice_test", <item:minecraft:diamond>, <item:minecraft:dirt>, <item:minecraft:apple>, 200);
ParameterTypeDescription
Parameter
name
Type
string
Description
The name of the recipe
Parameter
output
Type
IItemStack
Description
The output item
Parameter
input
Type
IIngredient
Description
The input Ingredient
Parameter
blood
Type
IIngredient
Description
The blood Ingredient
Parameter
cookTime
Type
int
Description
The cook time of the recipe
script.zs
DragonForgeRecipeManager.addJsonRecipe(name as string, mapData as MapData)
ParameterType
Parameter
name
Type
string
Parameter
mapData
Type
MapData

Adds a new Lightning Dragon Forge recipe.

script.zs
// DragonForgeRecipeManager.addLightningRecipe(name as string, output as IItemStack, input as IIngredient, blood as IIngredient, cookTime as int)
<recipetype:iceandfire:dragonforge>.addLightningRecipe("lightning_test", <item:minecraft:diamond>, <item:minecraft:dirt>, <item:minecraft:apple>, 200);
ParameterTypeDescription
Parameter
name
Type
string
Description
The name of the recipe
Parameter
output
Type
IItemStack
Description
The output item
Parameter
input
Type
IIngredient
Description
The input Ingredient
Parameter
blood
Type
IIngredient
Description
The blood Ingredient
Parameter
cookTime
Type
int
Description
The cook time of the recipe

Return Type: stdlib.List<T>

script.zs
// DragonForgeRecipeManager.getAllRecipes() as stdlib.List<T>
<recipetype:iceandfire:dragonforge>.getAllRecipes();

Return Type: T

script.zs
DragonForgeRecipeManager.getRecipeByName(name as string) as T
ParameterType
Parameter
name
Type
string

Return Type: T[ResourceLocation]

script.zs
// DragonForgeRecipeManager.getRecipeMap() as T[ResourceLocation]
<recipetype:iceandfire:dragonforge>.getRecipeMap();

Return Type: stdlib.List<T>

script.zs
DragonForgeRecipeManager.getRecipesByOutput(output as IIngredient) as stdlib.List<T>
ParameterType
Parameter
output
Type
IIngredient
script.zs
DragonForgeRecipeManager.remove(output as IIngredient)
ParameterType
Parameter
output
Type
IIngredient
script.zs
// DragonForgeRecipeManager.removeAll()
<recipetype:iceandfire:dragonforge>.removeAll();
script.zs
DragonForgeRecipeManager.removeByInput(input as IItemStack)
ParameterType
Parameter
input
Type
IItemStack
script.zs
DragonForgeRecipeManager.removeByModid(modid as string, exclude as Predicate<string>)
ParameterTypeOptionalDefault Value
Parameter
modid
Type
string
Optional
false
Default Value
Parameter
exclude
Type
Predicate<string>
Optional
true
Default Value
(name as string) as bool => false
script.zs
DragonForgeRecipeManager.removeByName(names as string[])
ParameterType
Parameter
names
Type
string[]
script.zs
DragonForgeRecipeManager.removeByRegex(regex as string, exclude as Predicate<string>)
ParameterTypeOptionalDefault Value
Parameter
regex
Type
string
Optional
false
Default Value
Parameter
exclude
Type
Predicate<string>
Optional
true
Default Value
(name as string) as bool => false

Properties

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