Interface EmiRecipeHandler<T extends Container>
- All Known Subinterfaces:
StandardRecipeHandler<T>
- All Known Implementing Classes:
BulkRecipeHandler,CoercedRecipeHandler,CookingRecipeHandler,CraftingRecipeHandler,InventoryRecipeHandler,SouforgeRecipeHandler,SoulforgeCraftingRecipeHandler
public interface EmiRecipeHandler<T extends Container>
The base recipe handler.
In most cases, implementing this is not necessary, and
StandardRecipeHandler can be used instead.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanalwaysDisplaySupport(EmiRecipe recipe) booleancanCraft(EmiRecipe recipe, EmiCraftContext<T> context) booleancraft(EmiRecipe recipe, EmiCraftContext<T> context) getInventory(GuiContainer screen) default List<TooltipComponent>getTooltip(EmiRecipe recipe, EmiCraftContext<T> context) default voidrender(EmiRecipe recipe, EmiCraftContext<T> context, List<Widget> widgets, DrawContext draw) Render feedback about the status of the current fill.booleansupportsRecipe(EmiRecipe recipe)
-
Field Details
-
NOT_ENOUGH_INGREDIENTS
-
-
Method Details
-
getInventory
- Returns:
- An inventory with the stacks the player can use for crafting. Craftables can only ever be discovered if the inventory contains one of its ingredients. A changed inventory indicates that EMI needs to refresh craftables.
-
supportsRecipe
- Returns:
- Whether the handler is applicable for the provided recipe.
-
alwaysDisplaySupport
- Returns:
- Whether the recipe should always display the ability to be filled if supported by this handler. When returning true, the recipe screen will always display a grayed out fill button in all contexts. Useful for recipe handlers which support nearly every recipe, and do not want to pollute the recipe screen.
-
canCraft
- Returns:
- Whether the handler can craft the provided recipe with the given context
-
craft
- Returns:
- Whether the craft was successful
-
getTooltip
- Returns:
- The tooltip describing status for crafting the recipe
-
render
default void render(EmiRecipe recipe, EmiCraftContext<T> context, List<Widget> widgets, DrawContext draw) Render feedback about the status of the current fill. Common use is to render an overlay on missing ingredients
-