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

DragonForgeRecipeManager

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import mods.iceandfire.recipe.DragonForgeRecipeManager;

Description

Implements

DragonForgeRecipeManager implements the following interfaces:

IRecipeManager<DragonForgeRecipe>,CommandStringDisplayable

Undocumented Interfaces

Iterable<Recipe>

Members

addFireRecipe(name as string, output as IItemStack, input as IIngredient, blood as IIngredient, cookTime as int)
Adds a new Fire Dragon Forge recipe.
script.zs
// DragonForge.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);

Parameters:

name Type: string - The name of the recipe
output Type: IItemStack - The output item
input Type: IIngredient - The input Ingredient
blood Type: IIngredient - The blood Ingredient
cookTime Type: int - The cook time of the recipe
addIceRecipe(name as string, output as IItemStack, input as IIngredient, blood as IIngredient, cookTime as int)
Adds a new Ice Dragon Forge recipe.
script.zs
// DragonForge.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);

Parameters:

name Type: string - The name of the recipe
output Type: IItemStack - The output item
input Type: IIngredient - The input Ingredient
blood Type: IIngredient - The blood Ingredient
cookTime Type: int - The cook time of the recipe
addJsonRecipe(name as string, mapData as MapData)
script.zs
// DragonForge.addJsonRecipe(name as string, mapData as MapData);
<recipetype:iceandfire:dragonforge>.addJsonRecipe(myString, myMapData);

Parameters:

name Type: string
mapData Type: MapData
addLightningRecipe(name as string, output as IItemStack, input as IIngredient, blood as IIngredient, cookTime as int)
Adds a new Lightning Dragon Forge recipe.
script.zs
// DragonForge.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);

Parameters:

name Type: string - The name of the recipe
output Type: IItemStack - The output item
input Type: IIngredient - The input Ingredient
blood Type: IIngredient - The blood Ingredient
cookTime Type: int - The cook time of the recipe
Getter
script.zs
// DragonForge.allRecipes as List<Recipe>
<recipetype:iceandfire:dragonforge>.allRecipes

Return Type: List<Recipe>

allRecipes() as List<Recipe>
script.zs
// DragonForge.allRecipes() as List<Recipe>;
<recipetype:iceandfire:dragonforge>.allRecipes();

Return Type: List<Recipe>

Getter
script.zs
// DragonForge.commandString as string
<recipetype:iceandfire:dragonforge>.commandString

Return Type: string

commandString() as string
script.zs
// DragonForge.commandString() as string;
<recipetype:iceandfire:dragonforge>.commandString();

Return Type: string

getRecipeByName(name as string) as Recipe
script.zs
// DragonForge.getRecipeByName(name as string) as Recipe;
<recipetype:iceandfire:dragonforge>.getRecipeByName(myString);

Parameters:

name Type: string

Return Type: Recipe

getRecipesByOutput(output as IIngredient) as List<Recipe>
script.zs
// DragonForge.getRecipesByOutput(output as IIngredient) as List<Recipe>;
<recipetype:iceandfire:dragonforge>.getRecipesByOutput(myIIngredient);

Parameters:

output Type: IIngredient

Return Type: List<Recipe>

Getter
script.zs
// DragonForge.recipeMap as Recipe[ResourceLocation]
<recipetype:iceandfire:dragonforge>.recipeMap

Return Type: Recipe[ResourceLocation]

recipeMap() as Recipe[ResourceLocation]
script.zs
// DragonForge.recipeMap() as Recipe[ResourceLocation];
<recipetype:iceandfire:dragonforge>.recipeMap();

Return Type: Recipe[ResourceLocation]

remove(output as IIngredient)
script.zs
// DragonForge.remove(output as IIngredient);
<recipetype:iceandfire:dragonforge>.remove(myIIngredient);

Parameters:

output Type: IIngredient
removeAll()
script.zs
// DragonForge.removeAll();
<recipetype:iceandfire:dragonforge>.removeAll();
removeByInput(input as IItemStack)
script.zs
// DragonForge.removeByInput(input as IItemStack);
<recipetype:iceandfire:dragonforge>.removeByInput(myIItemStack);

Parameters:

input Type: IItemStack
removeByModid(modid as string, exclude as function(t as string) as bool = (name as string) as bool => false)
script.zs
// DragonForge.removeByModid(modid as string, exclude as function(t as string) as bool = (name as string) as bool => false);
<recipetype:iceandfire:dragonforge>.removeByModid(myString, myPredicate);

Parameters:

modid Type: string
exclude (optional) Type: function(t as string) as bool

Default Value: (name as string) as bool => false

removeByName(names as string[])
script.zs
// DragonForge.removeByName(names as string[]);
<recipetype:iceandfire:dragonforge>.removeByName(myString[]);

Parameters:

names Type: string[]
removeByRegex(regex as string, exclude as function(t as string) as bool = (name as string) as bool => false)
script.zs
// DragonForge.removeByRegex(regex as string, exclude as function(t as string) as bool = (name as string) as bool => false);
<recipetype:iceandfire:dragonforge>.removeByRegex(myString, myPredicate);

Parameters:

regex Type: string
exclude (optional) Type: function(t as string) as bool

Default Value: (name as string) as bool => false