Interface EmiRegistry

All Known Implementing Classes:
EmiRegistryImpl

public interface EmiRegistry
  • Method Details

    • getRecipeManager

      CraftingManager getRecipeManager()
      Returns:
      The vanilla recipe manager, for iterating recipe types.
    • addCategory

      void addCategory(EmiRecipeCategory category)
      Adds a recipe category. Recipes are organized based on recipe category.
    • addWorkstation

      void addWorkstation(EmiRecipeCategory category, EmiIngredient workstation)
      Adds a workstation to a recipe category.
    • addRecipe

      void addRecipe(EmiRecipe recipe)
      Adds a recipe to EMI that can be viewed and associated with its components.
    • removeRecipes

      void removeRecipes(Predicate<EmiRecipe> predicate)
      Adds a predicate to run on all current and future recipes to prevent certain ones from being added.
    • removeRecipes

      default void removeRecipes(ResourceLocation id)
      Adds a predicate to run on all current and future recipes to prevent certain ones with the given identifier from being added.
    • addDeferredRecipes

      void addDeferredRecipes(Consumer<Consumer<EmiRecipe>> consumer)
      Add recipes that are reliant on a majority of EMI metadata is populated. The passed consumer will be run after all EMI plugins have executed.
    • addEmiStack

      void addEmiStack(EmiStack stack)
      Adds an EmiStack to the sidebar.
    • addEmiStackAfter

      void addEmiStackAfter(EmiStack stack, Predicate<EmiStack> predicate)
      Adds an EmiStack to the sidebar immediately following another. If the predicate never succeeds, the provided EmiStack will not be added.
    • addEmiStackAfter

      default void addEmiStackAfter(EmiStack stack, EmiStack other)
      Adds an EmiStack to the sidebar immediately following another. If the predicate never succeeds, the provided EmiStack will not be added.
    • removeEmiStacks

      void removeEmiStacks(Predicate<EmiStack> predicate)
      Adds a predicate to run on all current and future EmiStacks to prevent certain ones from being added to the sidebar.
    • removeEmiStacks

      default void removeEmiStacks(EmiStack stack)
      Adds a predicate to run on all current and future EmiStacks to prevent matching ones from being added to the sidebar.
    • addIngredientSerializer

      <T extends EmiIngredient> void addIngredientSerializer(Class<T> clazz, EmiIngredientSerializer<T> serializer)
      Adds a serializer for a given type of ingredient. This will allow it to be favorited, among other things.
    • addExclusionArea

      <T extends GuiScreen> void addExclusionArea(Class<T> clazz, EmiExclusionArea<T> area)
      Adds an EmiExclusionArea to screens of a given class. Exclusion areas can provide rectangles where EMI will not place EmiStacks.
    • addGenericExclusionArea

      void addGenericExclusionArea(EmiExclusionArea<GuiScreen> area)
      Adds an EmiExclusionArea to every screen. Exclusion areas can provide rectangles where EMI will not place EmiStacks.
    • addDragDropHandler

      <T extends GuiScreen> void addDragDropHandler(Class<T> clazz, EmiDragDropHandler<T> handler)
      Adds an EmiDragDropHandler to screens of a given class. Drag drop handlers can consume events related to sidebar stacks being dragged and dropped.
    • addGenericDragDropHandler

      void addGenericDragDropHandler(EmiDragDropHandler<GuiScreen> handler)
      Adds an EmiDragDropHandler to every screen. Drag drop handlers can consume events related to sidebar stacks being dragged and dropped.
    • addStackProvider

      <T extends GuiScreen> void addStackProvider(Class<T> clazz, EmiStackProvider<T> provider)
      Adds an EmiStackProvider to screens of a given class. Stack providers can inform EMI of EmiIngredients that are located on the screen.
    • addGenericStackProvider

      void addGenericStackProvider(EmiStackProvider<GuiScreen> provider)
      Adds an EmiStackProvider to every screen. Stack providers can inform EMI of EmiIngredients that are located on the screen.
    • setDefaultComparison

      void setDefaultComparison(Object key, Function<Comparison,Comparison> comparison)
      Adds a default compraison method for a stack key.
      Parameters:
      key - A stack key such as an item or fluid.
      comparison - A function to mutate the current comprison method.
    • setDefaultComparison

      default void setDefaultComparison(Object key, Comparison comparison)
      Adds a default compraison method for a stack using its key.
      Parameters:
      key - A stack key such as an item or fluid.
      comparison - The desired comparison method.
    • setDefaultComparison

      default void setDefaultComparison(EmiStack stack, Function<Comparison,Comparison> comparison)
      Adds a default compraison method for a stack using its key.
      Parameters:
      stack - A stack to derive a key from.
      comparison - A function to mutate the current comprison method.
    • setDefaultComparison

      default void setDefaultComparison(EmiStack stack, Comparison comparison)
      Adds a default compraison method for a stack using its key.
      Parameters:
      stack - A stack to derive a key from.
      comparison - The desired comparison method.
    • addRecipeHandler

      <T extends Container> void addRecipeHandler(Class<T> type, EmiRecipeHandler<T> handler)
      Adds a recipe handler to a specified type of screen handler. Recipe handlers are responsible for filling recipes automatically.