IRecipeManager
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.
Description
Default interface for Registry based handlers as they can all remove recipes by ResourceLocation.Implements
IRecipeManager<Recipe>
implements the following interfaces:
Undocumented Interfaces
Iterable<Recipe>
Members
addJsonRecipe(name as string, mapData as MapData)
Adds a recipe based on a provided IData. The provided IData should represent a DataPack json, this effectively allows you to register recipes for any DataPack supporting RecipeType systems.
getRecipeByName(name as string) as Recipe?
Parameters:
name: string
Type: string
Return Type:
Recipe?
getRecipesByOutput(output as IIngredient) as List<Recipe>
Parameters:
output: IIngredient
Type: IIngredient
Return Type:
List<Recipe>
Getter
Returns a map of all known recipes.
Return Type:
Recipe[ResourceLocation]
recipeMap() as Recipe[ResourceLocation]
Returns a map of all known recipes.
Returns: A Map of recipe name to recipe of all known recipes.
Return Type:
Recipe[ResourceLocation]
remove(output as IIngredient)
Remove a recipe based on it's output.
Parameters:
removeAll()
Remove all recipes in this registry
removeByInput(input as IItemStack)
Removes all recipes where the input contains the given IItemStack.
Parameters:
removeByModid(modid as string, exclude as function(t as string) as bool = (name as string) as bool => false)
Remove recipe based on Registry name modid
Parameters:
modid: string
Type: string
- modid of the recipes to remove exclude: function(t as string) as bool
(optional) Type: function(t as string) as bool
Default Value: (name as string) as bool => false
removeByName(names as string[])
Remove recipes based on Registry names
Parameters:
names: string[]
Type: string[]
- registry names of recipes to remove removeByRegex(regex as string, exclude as function(t as string) as bool = (name as string) as bool => false)
Remove recipe based on regex with an added exclusion check, so you can remove the whole mod besides a few specified.
Parameters:
regex: string
Type: string
- regex to match against exclude: function(t as string) as bool
(optional) Type: function(t as string) as bool
Default Value: (name as string) as bool => false