java.lang.Object
com.blamejared.crafttweaker.api.recipe.replacement.type.TypeFilteringRule
All Implemented Interfaces:
IFilteringRule, ITargetingFilter

@ZenRegister public final class TypeFilteringRule extends Object implements IFilteringRule
Filters recipes based on their IRecipeManager.
Since:
10.0.0
  • Method Details

    • of

      public static IFilteringRule of(IRecipeManager<?>... managers)
      Creates a new rule filtering recipes based on the given managers.
      Parameters:
      managers - The managers that should be filtered.
      Returns:
      A new rule carrying out the specified operation.
      Since:
      10.0.0
    • castFilter

      public Stream<? extends net.minecraft.world.item.crafting.Recipe<?>> castFilter(Stream<? extends net.minecraft.world.item.crafting.Recipe<?>> allRecipes)
      Description copied from interface: ITargetingFilter
      Casts the filter onto the given Stream of Recipes.

      The filter can perform any operation required, which range from filtering, to simple mapping, to peeking as needed.

      Specified by:
      castFilter in interface ITargetingFilter
      Parameters:
      allRecipes - The Stream that needs to be filtered.
      Returns:
      The mutated stream.
    • describe

      public String describe()
      Description copied from interface: IFilteringRule
      Describes the actions of this filtering rule in a human-readable form, for log output.
      Specified by:
      describe in interface IFilteringRule
      Returns:
      A human-readable description of this rule.