CraftingTableManager

This class was added by a mod with mod-id crafttweaker. So you need to have this mod installed if you want to use this feature.

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 crafttweaker.api.CraftingTableManager;

Implemented Interfaces

CraftingTableManager implements the following interfaces. That means all methods defined in these interfaces are also available in CraftingTableManager

Methods

addShaped

Adds a shaped recipe to the crafting table

Return Type: void

CraftingTableManager.addShaped(recipeName as string, output as IItemStack, ingredients as IIngredient[][], recipeFunction as RecipeFunctionMatrix) as void
craftingTable.addShaped("recipe_name", <item:minecraft:dirt>, [[<item:minecraft:diamond>], [<tag:minecraft:wool>]], (usualOut as IItemStack, inputs as IItemStack[][]) => {if(inputs[0][0].displayName == "totally real diamond block" ){return usualOut;}return <item:minecraft:clay>.setDisplayName("Diamond");});
ParameterTypeDescriptionOptionalDefaultValue
recipeNamestringname of the recipe to add.false
outputIItemStackoutput IItemStackfalse
ingredientsIIngredient[][]array of an array of IIngredient for inputsfalse
recipeFunctionRecipeFunctionMatrixoptional RecipeFunctionMatrix for more advanced conditionstrue
### addShapedMirrored

Adds a mirrored shaped recipe to the crafting table

Return Type: void

CraftingTableManager.addShapedMirrored(recipeName as string, output as IItemStack, ingredients as IIngredient[][], recipeFunction as RecipeFunctionMatrix) as void
craftingTable.addShapedMirrored("recipe_name", <item:minecraft:dirt>, [[<item:minecraft:diamond>], [<tag:minecraft:wool>]], (usualOut as IItemStack, inputs as IItemStack[][]) => {if(inputs[0][0].displayName == "totally real diamond block" ){return usualOut;}return <item:minecraft:clay>.setDisplayName("Diamond");});
ParameterTypeDescriptionOptionalDefaultValue
recipeNamestringname of the recipe to add.false
outputIItemStackoutput IItemStackfalse
ingredientsIIngredient[][]array of an array of IIngredient for inputsfalse
recipeFunctionRecipeFunctionMatrixoptional RecipeFunctionMatrix for more advanced conditionstrue
### addShapeless

Adds a shapeless recipe to the crafting table

Return Type: void

CraftingTableManager.addShapeless(recipeName as string, output as IItemStack, ingredients as IIngredient[], recipeFunction as RecipeFunctionArray) as void
craftingTable.addShapeless("recipe_name", <item:minecraft:dirt>, [<item:minecraft:diamond>, <tag:minecraft:wool>], (usualOut as IItemStack, inputs as IItemStack[]) => {if(inputs[0].displayName == "totally real diamond block" ){return usualOut;}return <item:minecraft:clay>.setDisplayName("Diamond");});
ParameterTypeDescriptionOptionalDefaultValue
recipeNamestringname of the recipe to add.false
outputIItemStackoutput IItemStackfalse
ingredientsIIngredient[]array of IIngredient for inputsfalse
recipeFunctionRecipeFunctionArrayoptional RecipeFunctionArray for more advanced conditionstrue