MechanicalCrafterManager

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.create.MechanicalCrafterManager;

Description

Implements

MechanicalCrafterManager implements the following interfaces:

IRecipeManager<MechanicalCraftingRecipe>,CommandStringDisplayable

Undocumented Interfaces

Iterable<Recipe>

Members

addJsonRecipe(name as string, mapData as MapData)
script.zs
// MechanicalCrafterManager.addJsonRecipe(name as string, mapData as MapData);
<recipetype:create:mechanical_crafting>.addJsonRecipe(myString, myMapData);

Parameters:

name Type: string
mapData Type: MapData
addMirroredRecipe(name as string, output as IItemStack, ingredients as IIngredient[][])
Adds a mirrored recipe to the Mechanical Crafter.
script.zs
// 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>]]);

Parameters:

name Type: string - The name of the recipe.
output Type: IItemStack - The output of the recipe.
ingredients Type: IIngredient[][] - The ingredients of the recipe.
addRecipe(name as string, output as IItemStack, ingredients as IIngredient[][])
Adds a recipe to the Mechanical Crafter.
script.zs
// 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>]]);

Parameters:

name Type: string - The name of the recipe.
output Type: IItemStack - The output of the recipe.
ingredients Type: IIngredient[][] - The ingredients of the recipe.
Getter
script.zs
// MechanicalCrafterManager.allRecipes as List<Recipe>
<recipetype:create:mechanical_crafting>.allRecipes

Return Type: List<Recipe>

allRecipes() as List<Recipe>
script.zs
// MechanicalCrafterManager.allRecipes() as List<Recipe>;
<recipetype:create:mechanical_crafting>.allRecipes();

Return Type: List<Recipe>

Getter
script.zs
// MechanicalCrafterManager.commandString as string
<recipetype:create:mechanical_crafting>.commandString

Return Type: string

commandString() as string
script.zs
// MechanicalCrafterManager.commandString() as string;
<recipetype:create:mechanical_crafting>.commandString();

Return Type: string

getRecipeByName(name as string) as Recipe
script.zs
// MechanicalCrafterManager.getRecipeByName(name as string) as Recipe;
<recipetype:create:mechanical_crafting>.getRecipeByName(myString);

Parameters:

name Type: string

Return Type: Recipe

getRecipesByOutput(output as IIngredient) as List<Recipe>
script.zs
// MechanicalCrafterManager.getRecipesByOutput(output as IIngredient) as List<Recipe>;
<recipetype:create:mechanical_crafting>.getRecipesByOutput(myIIngredient);

Parameters:

output Type: IIngredient

Return Type: List<Recipe>

Getter
script.zs
// MechanicalCrafterManager.recipeMap as Recipe[ResourceLocation]
<recipetype:create:mechanical_crafting>.recipeMap

Return Type: Recipe[ResourceLocation]

recipeMap() as Recipe[ResourceLocation]
script.zs
// MechanicalCrafterManager.recipeMap() as Recipe[ResourceLocation];
<recipetype:create:mechanical_crafting>.recipeMap();

Return Type: Recipe[ResourceLocation]

remove(output as IIngredient)
script.zs
// MechanicalCrafterManager.remove(output as IIngredient);
<recipetype:create:mechanical_crafting>.remove(myIIngredient);

Parameters:

output Type: IIngredient
removeAll()
script.zs
// MechanicalCrafterManager.removeAll();
<recipetype:create:mechanical_crafting>.removeAll();
removeByInput(input as IItemStack)
script.zs
// MechanicalCrafterManager.removeByInput(input as IItemStack);
<recipetype:create:mechanical_crafting>.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
// MechanicalCrafterManager.removeByModid(modid as string, exclude as function(t as string) as bool = (name as string) as bool => false);
<recipetype:create:mechanical_crafting>.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
// MechanicalCrafterManager.removeByName(names as string[]);
<recipetype:create:mechanical_crafting>.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
// MechanicalCrafterManager.removeByRegex(regex as string, exclude as function(t as string) as bool = (name as string) as bool => false);
<recipetype:create:mechanical_crafting>.removeByRegex(myString, myPredicate);

Parameters:

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

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