Enum Class CraftingTableRecipeManager
java.lang.Object
java.lang.Enum<CraftingTableRecipeManager>
com.blamejared.crafttweaker.api.recipe.manager.CraftingTableRecipeManager
- All Implemented Interfaces:
CommandStringDisplayable,IRecipeManager<net.minecraft.world.item.crafting.CraftingRecipe>,Serializable,Comparable<CraftingTableRecipeManager>,Constable,Iterable<net.minecraft.world.item.crafting.CraftingRecipe>
@ZenRegister
public enum CraftingTableRecipeManager
extends Enum<CraftingTableRecipeManager>
implements IRecipeManager<net.minecraft.world.item.crafting.CraftingRecipe>
- DocParam:
- this craftingTable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields inherited from interface com.blamejared.crafttweaker.api.recipe.manager.base.IRecipeManager
JSON_RECIPE_GSON -
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) static IIngredient[][]dissolvePattern(String[] pattern, Map<String, IIngredient> keys, int width, int height) net.minecraft.world.item.crafting.RecipeType<net.minecraft.world.item.crafting.CraftingRecipe>Gets the recipe type for the registry to remove from.static CraftingTableRecipeManagerReturns the enum constant of this class with the specified name.static CraftingTableRecipeManager[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface com.blamejared.crafttweaker.api.recipe.manager.base.IRecipeManager
addJsonRecipe, fixRecipeName, getAllRecipes, getBracketResourceLocation, getCommandString, getRecipeByName, getRecipeList, getRecipeMap, getRecipes, getRecipesByOutput, iterator, remove, removeAll, removeByInput, removeByModid, removeByName, removeByName, removeByRegexMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
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 <item:minecraft:dirt>, ingredients [[<item:minecraft:diamond>], [<tag:items:minecraft:wool>]], recipeFunction (usualOut as IItemStack, inputs as IItemStack[][]) => {if(inputs[0][0].displayName == "totally real diamond block" ){return usualOut;}return <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.
-
dissolvePattern
public static IIngredient[][] dissolvePattern(String[] pattern, Map<String, IIngredient> keys, int width, int height)
-