Invalid leaf directive! `since`

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
Copy
import 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

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
ParametroTipoDescrizione
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
Copy
CustomFilteringRule.of(predicate as Predicate<Recipe>) as CustomFilteringRule
ParametroTipoDescrizione
Parametro
predicate
Tipo
Predicate<Recipe>
Descrizione
The predicate for checking.