Package emi.dev.emi.emi.registry
Class EmiRegistryImpl
java.lang.Object
emi.dev.emi.emi.registry.EmiRegistryImpl
- All Implemented Interfaces:
EmiRegistry
-
Constructor Summary
Constructors -
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.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.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.voidsetDefaultComparison(Object key, Function<Comparison, Comparison> comparison) Adds a default compraison method for a stack key.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface emi.dev.emi.emi.api.EmiRegistry
addEmiStackAfter, removeEmiStacks, removeRecipes, setDefaultComparison, setDefaultComparison, setDefaultComparison
-
Constructor Details
-
EmiRegistryImpl
public EmiRegistryImpl()
-
-
Method Details
-
getRecipeManager
- Specified by:
getRecipeManagerin interfaceEmiRegistry- Returns:
- The vanilla recipe manager, for iterating recipe types.
-
addCategory
Description copied from interface:EmiRegistryAdds a recipe category. Recipes are organized based on recipe category.- Specified by:
addCategoryin interfaceEmiRegistry
-
addWorkstation
Description copied from interface:EmiRegistryAdds a workstation to a recipe category.- Specified by:
addWorkstationin interfaceEmiRegistry
-
addRecipe
Description copied from interface:EmiRegistryAdds a recipe to EMI that can be viewed and associated with its components.- Specified by:
addRecipein interfaceEmiRegistry
-
removeRecipes
Description copied from interface:EmiRegistryAdds a predicate to run on all current and future recipes to prevent certain ones from being added.- Specified by:
removeRecipesin interfaceEmiRegistry
-
addDeferredRecipes
Description copied from interface:EmiRegistryAdd recipes that are reliant on a majority of EMI metadata is populated. The passed consumer will be run after all EMI plugins have executed.- Specified by:
addDeferredRecipesin interfaceEmiRegistry
-
addEmiStack
Description copied from interface:EmiRegistryAdds an EmiStack to the sidebar.- Specified by:
addEmiStackin interfaceEmiRegistry
-
addEmiStackAfter
Description copied from interface:EmiRegistryAdds an EmiStack to the sidebar immediately following another. If the predicate never succeeds, the provided EmiStack will not be added.- Specified by:
addEmiStackAfterin interfaceEmiRegistry
-
removeEmiStacks
Description copied from interface:EmiRegistryAdds a predicate to run on all current and future EmiStacks to prevent certain ones from being added to the sidebar.- Specified by:
removeEmiStacksin interfaceEmiRegistry
-
addIngredientSerializer
public <T extends EmiIngredient> void addIngredientSerializer(Class<T> clazz, EmiIngredientSerializer<T> serializer) Description copied from interface:EmiRegistryAdds a serializer for a given type of ingredient. This will allow it to be favorited, among other things.- Specified by:
addIngredientSerializerin interfaceEmiRegistry
-
addExclusionArea
Description copied from interface:EmiRegistryAdds an EmiExclusionArea to screens of a given class. Exclusion areas can provide rectangles where EMI will not place EmiStacks.- Specified by:
addExclusionAreain interfaceEmiRegistry
-
addGenericExclusionArea
Description copied from interface:EmiRegistryAdds an EmiExclusionArea to every screen. Exclusion areas can provide rectangles where EMI will not place EmiStacks.- Specified by:
addGenericExclusionAreain interfaceEmiRegistry
-
addDragDropHandler
Description copied from interface:EmiRegistryAdds an EmiDragDropHandler to screens of a given class. Drag drop handlers can consume events related to sidebar stacks being dragged and dropped.- Specified by:
addDragDropHandlerin interfaceEmiRegistry
-
addGenericDragDropHandler
Description copied from interface:EmiRegistryAdds an EmiDragDropHandler to every screen. Drag drop handlers can consume events related to sidebar stacks being dragged and dropped.- Specified by:
addGenericDragDropHandlerin interfaceEmiRegistry
-
addStackProvider
Description copied from interface:EmiRegistryAdds an EmiStackProvider to screens of a given class. Stack providers can inform EMI of EmiIngredients that are located on the screen.- Specified by:
addStackProviderin interfaceEmiRegistry
-
addGenericStackProvider
Description copied from interface:EmiRegistryAdds an EmiStackProvider to every screen. Stack providers can inform EMI of EmiIngredients that are located on the screen.- Specified by:
addGenericStackProviderin interfaceEmiRegistry
-
addRecipeHandler
Description copied from interface:EmiRegistryAdds a recipe handler to a specified type of screen handler. Recipe handlers are responsible for filling recipes automatically.- Specified by:
addRecipeHandlerin interfaceEmiRegistry
-
setDefaultComparison
Description copied from interface:EmiRegistryAdds a default compraison method for a stack key.- Specified by:
setDefaultComparisonin interfaceEmiRegistry- Parameters:
key- A stack key such as an item or fluid.comparison- A function to mutate the current comprison method.
-