Class ActionRemoveGenericRecipe

All Implemented Interfaces:
IAction, IRuntimeAction

public class ActionRemoveGenericRecipe extends ActionRemoveGenericRecipeBase
  • Field Details

    • removePredicate

      protected final Predicate<net.minecraft.world.item.crafting.Recipe<?>> removePredicate
    • describeFunction

      protected Supplier<String> describeFunction
  • Constructor Details

    • ActionRemoveGenericRecipe

      public ActionRemoveGenericRecipe(Predicate<net.minecraft.world.item.crafting.Recipe<?>> removePredicate)
    • ActionRemoveGenericRecipe

      public ActionRemoveGenericRecipe(Predicate<net.minecraft.world.item.crafting.Recipe<?>> removePredicate, Supplier<String> describeFunction)
  • Method Details

    • describe

      public String describe()
      Description copied from interface: IAction
      Gets a human-readable description of the action.

      This message is used for logging and to surface information to the user when something goes wrong. It is thus customary to describe the action as accurately as possible without being too verbose.

      It is not allowed to return a null or otherwise empty description for the action: doing so will raise an error at runtime.

      Returns:
      A description of the current action.
    • shouldRemove

      protected boolean shouldRemove(net.minecraft.world.item.crafting.Recipe<?> recipe)
      Specified by:
      shouldRemove in class ActionRemoveGenericRecipeBase