Class SpecificRecipesTargetingRule

java.lang.Object
com.blamejared.crafttweaker.api.recipe.replacement.rule.SpecificRecipesTargetingRule
All Implemented Interfaces:
ITargetingRule

public final class SpecificRecipesTargetingRule extends Object implements ITargetingRule
  • Method Details

    • of

      public static SpecificRecipesTargetingRule of(Collection<net.minecraft.world.item.crafting.Recipe<?>> recipes)
    • of

      public static SpecificRecipesTargetingRule of(net.minecraft.world.item.crafting.Recipe<?>... recipes)
    • shouldBeReplaced

      public boolean shouldBeReplaced(net.minecraft.world.item.crafting.Recipe<?> recipe, IRecipeManager<?> manager)
      Description copied from interface: ITargetingRule
      Indicates whether the given recipe should undergo ingredient replacement or not.

      Rules are allowed to check any aspect of the provided objects to validate the recipe, as long as the result remains consistent across multiple calls with the same objects.

      Specified by:
      shouldBeReplaced in interface ITargetingRule
      Parameters:
      recipe - The recipe to check for targeting.
      manager - The recipe manager that is responsible for the given recipe.
      Returns:
      Whether the given recipe should undergo ingredient replacement or not.
    • describe

      public String describe()
      Description copied from interface: ITargetingRule
      Describes in a short and simple sentence the behavior of this rule.
      Specified by:
      describe in interface ITargetingRule
      Returns:
      The description of this rule.
    • recipes

      public Collection<net.minecraft.world.item.crafting.Recipe<?>> recipes()