Invalid leaf directive! `since`

CustomFilteringRule

Link to customfilteringrule

Filters recipes according to a custom set of rules.

Importing the class

Link to 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.

ZenScript
Copy
import crafttweaker.api.recipe.replacement.type.CustomFilteringRule;

Implemented Interfaces

Link to implemented-interfaces

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

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
Copy
CustomFilteringRule.of(predicate as BiPredicate<IRecipeManager,Recipe>) as CustomFilteringRule
ParameterTypeDescription
Parameter
predicate
Type
BiPredicate<IRecipeManager,Recipe>
Description
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
Copy
CustomFilteringRule.of(predicate as Predicate<Recipe>) as CustomFilteringRule
ParameterTypeDescription
Parameter
predicate
Type
Predicate<Recipe>
Description
The predicate for checking.