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.
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.
// 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);
Parameter | Type | Description |
---|---|---|
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.
// 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);
Parameter | Type | Description |
---|---|---|
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 |
DragonForgeRecipeManager.addJsonRecipe(name as string, mapData as MapData)
Parameter | Type |
---|---|
Parameter name | Type string |
Parameter mapData | Type MapData |
Adds a new Lightning Dragon Forge recipe.
// 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);
Parameter | Type | Description |
---|---|---|
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>
// DragonForgeRecipeManager.getAllRecipes() as stdlib.List<T>
<recipetype:iceandfire:dragonforge>.getAllRecipes();
Return Type: T
DragonForgeRecipeManager.getRecipeByName(name as string) as T
Parameter | Type |
---|---|
Parameter name | Type string |
Return Type: T[ResourceLocation]
// DragonForgeRecipeManager.getRecipeMap() as T[ResourceLocation]
<recipetype:iceandfire:dragonforge>.getRecipeMap();
Return Type: stdlib.List<T>
DragonForgeRecipeManager.getRecipesByOutput(output as IIngredient) as stdlib.List<T>
Parameter | Type |
---|---|
Parameter output | Type IIngredient |
DragonForgeRecipeManager.remove(output as IIngredient)
Parameter | Type |
---|---|
Parameter output | Type IIngredient |
// DragonForgeRecipeManager.removeAll()
<recipetype:iceandfire:dragonforge>.removeAll();
DragonForgeRecipeManager.removeByInput(input as IItemStack)
Parameter | Type |
---|---|
Parameter input | Type IItemStack |
DragonForgeRecipeManager.removeByModid(modid as string, exclude as Predicate<string>)
Parameter | Type | Optional | Default Value |
---|---|---|---|
Parameter modid | Type string | Optional false | Default Value |
Parameter exclude | Type Predicate<string> | Optional true | Default Value (name as string) as bool => false |
DragonForgeRecipeManager.removeByName(names as string[])
Parameter | Type |
---|---|
Parameter names | Type string[] |
DragonForgeRecipeManager.removeByRegex(regex as string, exclude as Predicate<string>)
Parameter | Type | Optional | Default 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
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name allRecipes | Type stdlib.List<T> | Has Getter true | Has Setter false |
Name recipeMap | Type T[ResourceLocation] | Has Getter true | Has Setter false |