Interface IRecipeHandlerRegistrationHandler


public interface IRecipeHandlerRegistrationHandler
Manages the registration of IRecipeHandlers for CraftTweaker.

Refer to the recipe handler documentation for more information.

Since:
9.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends net.minecraft.world.item.crafting.Recipe<?>>
    void
    registerRecipeHandler(Class<? extends T> recipe, IRecipeHandler<T> handler)
    Registers a recipe handler for the given recipe class.
  • Method Details

    • registerRecipeHandler

      <T extends net.minecraft.world.item.crafting.Recipe<?>> void registerRecipeHandler(Class<? extends T> recipe, IRecipeHandler<T> handler)
      Registers a recipe handler for the given recipe class.

      It is not allowed to register multiple handlers for the same recipe class or register a generic handler for the Recipe class directly. Having multiple recipe classes bound to the same handler is on the other hand allowed.

      Type Parameters:
      T - The type of the recipe for which the handler is.
      Parameters:
      recipe - The class of the recipe for which the handler should be registered.
      handler - The handler instance that needs to be registered.
      Since:
      9.1.0