MechanicalCrafterManager
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.create.MechanicalCrafterManager;
Implemented Interfaces
MechanicalCrafterManager implements the following interfaces. That means all methods defined in these interfaces are also available in MechanicalCrafterManager
Methods
MechanicalCrafterManager.addJsonRecipe(name as string, mapData as MapData)
Parameter | Type |
---|---|
Parameter name | Type string |
Parameter mapData | Type MapData |
Adds a mirrored recipe to the Mechanical Crafter.
// MechanicalCrafterManager.addMirroredRecipe(name as string, output as IItemStack, ingredients as IIngredient[][])
<recipetype:create:mechanical_crafting>.addMirroredRecipe("mirrorized", <item:minecraft:glass>, [[<item:minecraft:diamond>, <item:minecraft:air>, <item:minecraft:diamond>], [<item:minecraft:air>, <item:minecraft:diamond>, <item:minecraft:air>]]);
Parameter | Type | Description |
---|---|---|
Parameter name | Type string | Description The name of the recipe. |
Parameter output | Type IItemStack | Description The output of the recipe. |
Parameter ingredients | Type IIngredient[][] | Description The ingredients of the recipe. |
Adds a recipe to the Mechanical Crafter.
// MechanicalCrafterManager.addRecipe(name as string, output as IItemStack, ingredients as IIngredient[][])
<recipetype:create:mechanical_crafting>.addRecipe("mechanized", <item:minecraft:diamond>, [[<item:minecraft:dirt>, <item:minecraft:air>, <item:minecraft:dirt>], [<item:minecraft:air>, <item:minecraft:dirt>, <item:minecraft:air>]]);
Parameter | Type | Description |
---|---|---|
Parameter name | Type string | Description The name of the recipe. |
Parameter output | Type IItemStack | Description The output of the recipe. |
Parameter ingredients | Type IIngredient[][] | Description The ingredients of the recipe. |
Return Type: stdlib.List<T>
// MechanicalCrafterManager.getAllRecipes() as stdlib.List<T>
<recipetype:create:mechanical_crafting>.getAllRecipes();
Return Type: T
MechanicalCrafterManager.getRecipeByName(name as string) as T
Parameter | Type |
---|---|
Parameter name | Type string |
Return Type: T[ResourceLocation]
// MechanicalCrafterManager.getRecipeMap() as T[ResourceLocation]
<recipetype:create:mechanical_crafting>.getRecipeMap();
Return Type: stdlib.List<T>
MechanicalCrafterManager.getRecipesByOutput(output as IIngredient) as stdlib.List<T>
Parameter | Type |
---|---|
Parameter output | Type IIngredient |
MechanicalCrafterManager.remove(output as IIngredient)
Parameter | Type |
---|---|
Parameter output | Type IIngredient |
// MechanicalCrafterManager.removeAll()
<recipetype:create:mechanical_crafting>.removeAll();
MechanicalCrafterManager.removeByInput(input as IItemStack)
Parameter | Type |
---|---|
Parameter input | Type IItemStack |
MechanicalCrafterManager.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 |
MechanicalCrafterManager.removeByName(names as string[])
Parameter | Type |
---|---|
Parameter names | Type string[] |
MechanicalCrafterManager.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 |