Class CraftingTableRecipeManager
java.lang.Object
com.blamejared.crafttweaker.api.recipe.manager.CraftingTableRecipeManager
- All Implemented Interfaces:
CommandStringDisplayable,IRecipeManager<net.minecraft.world.item.crafting.CraftingRecipe>,Iterable<net.minecraft.world.item.crafting.RecipeHolder<net.minecraft.world.item.crafting.CraftingRecipe>>
@ZenRegister
public class CraftingTableRecipeManager
extends Object
implements IRecipeManager<net.minecraft.world.item.crafting.CraftingRecipe>
- DocParam:
- this craftingTable
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddShaped(String recipeName, IItemStack output, IIngredient[][] ingredients, RecipeFunction2D recipeFunction) voidaddShapedMirrored(String recipeName, MirrorAxis mirrorAxis, IItemStack output, IIngredient[][] ingredients, RecipeFunction2D recipeFunction) Adds a mirrored shaped recipe to the crafting table.voidaddShapedPattern(String recipeName, IItemStack output, String[] pattern, Map<String, IIngredient> keys, RecipeFunction2D recipeFunction) voidaddShapeless(String recipeName, IItemStack output, IIngredient[] ingredients, RecipeFunction1D recipeFunction) net.minecraft.world.item.crafting.RecipeType<net.minecraft.world.item.crafting.CraftingRecipe> Gets the recipe type for the registry to remove from.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.blamejared.crafttweaker.api.recipe.manager.base.IRecipeManager
addJsonRecipe, createHolder, fixRecipeId, fixRecipeId, fixRecipeName, getAllRecipes, getBracketResourceLocation, getCommandString, getRecipeByName, getRecipeList, getRecipeMap, getRecipes, getRecipesByOutput, getRecipesMatching, iterator, remove, removeAll, removeByInput, removeByModid, removeByName, removeByRegex, removeMatchingMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
INSTANCE
-
-
Method Details
-
addShaped
public void addShaped(String recipeName, IItemStack output, IIngredient[][] ingredients, RecipeFunction2D recipeFunction) -
addShapedPattern
public void addShapedPattern(String recipeName, IItemStack output, String[] pattern, Map<String, IIngredient> keys, RecipeFunction2D recipeFunction) -
addShapedMirrored
public void addShapedMirrored(String recipeName, MirrorAxis mirrorAxis, IItemStack output, IIngredient[][] ingredients, RecipeFunction2D recipeFunction) Adds a mirrored shaped recipe to the crafting table. This method lets you provide aMirrorAxis, which can be used to set which axis the recipe is mirrored on. Use cases are making a recipe only be mirrored vertically or only horizontally.- Parameters:
recipeName- name of the recipe to add.mirrorAxis- The axis that this recipe mirrored on.output- outputIItemStackingredients- array of an array ofIIngredientfor inputsrecipeFunction- optionalRecipeFunction2Dfor more advanced conditions- DocParam:
- recipeName "recipe_name", mirrorAxis MirrorAxis.DIAGONAL, output invalid input: '<'item:minecraft:dirt>, ingredients [[invalid input: '<'item:minecraft:diamond>], [invalid input: '<'tag:item:minecraft:wool>]], recipeFunction (usualOut as IItemStack, inputs as IItemStack[][]) => {if(inputs[0][0].displayName == "totally real diamond block" ){return usualOut;}return invalid input: '<'item:minecraft:clay>.setDisplayName("Diamond");}
-
addShapeless
public void addShapeless(String recipeName, IItemStack output, IIngredient[] ingredients, RecipeFunction1D recipeFunction) -
getRecipeType
public net.minecraft.world.item.crafting.RecipeType<net.minecraft.world.item.crafting.CraftingRecipe> getRecipeType()Description copied from interface:IRecipeManagerGets the recipe type for the registry to remove from.- Specified by:
getRecipeTypein interfaceIRecipeManager<net.minecraft.world.item.crafting.CraftingRecipe>- Returns:
- IRecipeType of this registry.
-