Package emi.dev.emi.emi.api
Interface EmiRegistry
- All Known Implementing Classes:
EmiRegistryImpl
public interface EmiRegistry
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddCategory(EmiRecipeCategory category) Adds a recipe category.voidaddDeferredRecipes(Consumer<Consumer<EmiRecipe>> consumer) Add recipes that are reliant on a majority of EMI metadata is populated.<T extends GuiScreen>
voidaddDragDropHandler(Class<T> clazz, EmiDragDropHandler<T> handler) Adds an EmiDragDropHandler to screens of a given class.voidaddEmiStack(EmiStack stack) Adds an EmiStack to the sidebar.default voidaddEmiStackAfter(EmiStack stack, EmiStack other) Adds an EmiStack to the sidebar immediately following another.voidaddEmiStackAfter(EmiStack stack, Predicate<EmiStack> predicate) Adds an EmiStack to the sidebar immediately following another.<T extends GuiScreen>
voidaddExclusionArea(Class<T> clazz, EmiExclusionArea<T> area) Adds an EmiExclusionArea to screens of a given class.voidAdds an EmiDragDropHandler to every screen.voidAdds an EmiExclusionArea to every screen.voidaddGenericStackProvider(EmiStackProvider<GuiScreen> provider) Adds an EmiStackProvider to every screen.<T extends EmiIngredient>
voidaddIngredientSerializer(Class<T> clazz, EmiIngredientSerializer<T> serializer) Adds a serializer for a given type of ingredient.voidAdds a recipe to EMI that can be viewed and associated with its components.<T extends Container>
voidaddRecipeHandler(Class<T> type, EmiRecipeHandler<T> handler) Adds a recipe handler to a specified type of screen handler.<T extends GuiScreen>
voidaddStackProvider(Class<T> clazz, EmiStackProvider<T> provider) Adds an EmiStackProvider to screens of a given class.voidaddWorkstation(EmiRecipeCategory category, EmiIngredient workstation) Adds a workstation to a recipe category.default voidremoveEmiStacks(EmiStack stack) Adds a predicate to run on all current and future EmiStacks to prevent matching ones from being added to the sidebar.voidremoveEmiStacks(Predicate<EmiStack> predicate) Adds a predicate to run on all current and future EmiStacks to prevent certain ones from being added to the sidebar.voidremoveRecipes(Predicate<EmiRecipe> predicate) Adds a predicate to run on all current and future recipes to prevent certain ones from being added.default voidAdds a predicate to run on all current and future recipes to prevent certain ones with the given identifier from being added.default voidsetDefaultComparison(EmiStack stack, Comparison comparison) Adds a default compraison method for a stack using its key.default voidsetDefaultComparison(EmiStack stack, Function<Comparison, Comparison> comparison) Adds a default compraison method for a stack using its key.default voidsetDefaultComparison(Object key, Comparison comparison) Adds a default compraison method for a stack using its key.voidsetDefaultComparison(Object key, Function<Comparison, Comparison> comparison) Adds a default compraison method for a stack key.
-
Method Details
-
getRecipeManager
CraftingManager getRecipeManager()- Returns:
- The vanilla recipe manager, for iterating recipe types.
-
addCategory
Adds a recipe category. Recipes are organized based on recipe category. -
addWorkstation
Adds a workstation to a recipe category. -
addRecipe
Adds a recipe to EMI that can be viewed and associated with its components. -
removeRecipes
Adds a predicate to run on all current and future recipes to prevent certain ones from being added. -
removeRecipes
Adds a predicate to run on all current and future recipes to prevent certain ones with the given identifier from being added. -
addDeferredRecipes
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
Adds an EmiStack to the sidebar. -
addEmiStackAfter
Adds an EmiStack to the sidebar immediately following another. If the predicate never succeeds, the provided EmiStack will not be added. -
addEmiStackAfter
Adds an EmiStack to the sidebar immediately following another. If the predicate never succeeds, the provided EmiStack will not be added. -
removeEmiStacks
Adds a predicate to run on all current and future EmiStacks to prevent certain ones from being added to the sidebar. -
removeEmiStacks
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
Adds an EmiExclusionArea to screens of a given class. Exclusion areas can provide rectangles where EMI will not place EmiStacks. -
addGenericExclusionArea
Adds an EmiExclusionArea to every screen. Exclusion areas can provide rectangles where EMI will not place EmiStacks. -
addDragDropHandler
Adds an EmiDragDropHandler to screens of a given class. Drag drop handlers can consume events related to sidebar stacks being dragged and dropped. -
addGenericDragDropHandler
Adds an EmiDragDropHandler to every screen. Drag drop handlers can consume events related to sidebar stacks being dragged and dropped. -
addStackProvider
Adds an EmiStackProvider to screens of a given class. Stack providers can inform EMI of EmiIngredients that are located on the screen. -
addGenericStackProvider
Adds an EmiStackProvider to every screen. Stack providers can inform EMI of EmiIngredients that are located on the screen. -
setDefaultComparison
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
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
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
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
Adds a recipe handler to a specified type of screen handler. Recipe handlers are responsible for filling recipes automatically.
-