IRecipeComponent
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.
Description
Represents a part of a recipe after it has been decomposed.Recipe components in a recipe are associated with a list of data, whose type varies depending on the component. The data indicates what the component is made up of, allowing for introspection and selective editing of any recipe that can be decomposed and then recomposed, without requiring explicit support for every type of change.
Obtaining an instance of a recipe component in a script can be done through the usage of the <recipecomponent>
bracket handler. Integration writers can instead refer to the find
method.
Every recipe component must be registered to the registry through a plugin to be able to be used effectively and discovered by script writers. New recipe components can be created with either simple
or composite
. A set of common components is already provided by CraftTweaker.
Implements
IRecipeComponent<T>
implements the following interfaces: