CustomFilteringRule
Link to customfilteringrule
Filters recipes according to a custom set of rules.
Importare la Classe
Link to importare-la-classe
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.
ZenScript Copyimport crafttweaker.api.recipe.replacement.type.CustomFilteringRule;
Interfacce Implementate
Link to interfacce-implementate
CustomFilteringRule implements the following interfaces. That means all methods defined in these interfaces are also available in CustomFilteringRule
Static Methods
Link to static-methods
Name: of
Creates a new rule filtering recipes based on the given BiPredicate<T,U>.
The predicate's first argument represents the IRecipeManager<T> used by the recipe, whereas the second
argument is the Recipe<C> instance directly, allowing for it to check properties that might be required or
perform additional manager-specific lookups.
Returns: A rule carrying out what has been specified.
Return Type: CustomFilteringRule
ZenScript CopyCustomFilteringRule.of(predicate as BiPredicate<IRecipeManager,Recipe>) as CustomFilteringRule
Parametro | Tipo | Descrizione |
---|---|---|
Parametro predicate | Tipo BiPredicate<IRecipeManager,Recipe> | Descrizione The predicate for checking. |
Name: of
Creates a new rule filtering recipes based on the given Predicate<T>.
The predicate gets access to the Recipe<C> instance directly, allowing for it to check directly elements
that might be required.
Returns: A rule carrying out what has been specified.
Return Type: CustomFilteringRule
ZenScript CopyCustomFilteringRule.of(predicate as Predicate<Recipe>) as CustomFilteringRule
Parametro | Tipo | Descrizione |
---|---|---|
Parametro predicate | Tipo Predicate<Recipe> | Descrizione The predicate for checking. |