Interface StandardRecipeHandler<T extends Container>
- All Superinterfaces:
EmiRecipeHandler<T>
- All Known Implementing Classes:
BulkRecipeHandler,CoercedRecipeHandler,CookingRecipeHandler,CraftingRecipeHandler,InventoryRecipeHandler,SouforgeRecipeHandler,SoulforgeCraftingRecipeHandler
-
Field Summary
Fields inherited from interface emi.dev.emi.emi.api.recipe.handler.EmiRecipeHandler
NOT_ENOUGH_INGREDIENTS -
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanCraft(EmiRecipe recipe, EmiCraftContext<T> context) default booleancraft(EmiRecipe recipe, EmiCraftContext<T> context) static Map<EmiIngredient,Boolean> getAvailable(EmiRecipe recipe, EmiPlayerInventory inventory) getCraftingSlots(EmiRecipe recipe, T handler) getCraftingSlots(T handler) getInputSources(T handler) default EmiPlayerInventorygetInventory(GuiContainer screen) default @Nullable SlotgetOutputSlot(T handler) default voidrender(EmiRecipe recipe, EmiCraftContext<T> context, List<Widget> widgets, DrawContext draw) Render feedback about the status of the current fill.static voidrenderMissing(EmiRecipe recipe, EmiPlayerInventory inv, List<Widget> widgets, DrawContext draw) Methods inherited from interface emi.dev.emi.emi.api.recipe.handler.EmiRecipeHandler
alwaysDisplaySupport, getTooltip, supportsRecipe
-
Method Details
-
getInputSources
- Returns:
- The slots for the recipe handler to source ingredients from. Typically this should include the player's inventory, and crafting slots.
-
getCraftingSlots
- Returns:
- The slots where inputs should be placed to perform crafting.
-
getCraftingSlots
- Returns:
- The slots where inputs should be placed to perform crafting for a particular context.
-
getOutputSlot
- Returns:
- The output slot for recipe handlers that support instant interaction, like crafting tables. For handlers that have processing time, or where this concept is otherwise inapplicable, null.
-
getInventory
- Specified by:
getInventoryin interfaceEmiRecipeHandler<T extends Container>- 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.
-
canCraft
- Specified by:
canCraftin interfaceEmiRecipeHandler<T extends Container>- Returns:
- Whether the handler can craft the provided recipe with the given context
-
craft
- Specified by:
craftin interfaceEmiRecipeHandler<T extends Container>- Returns:
- Whether the craft was successful
-
render
default void render(EmiRecipe recipe, EmiCraftContext<T> context, List<Widget> widgets, DrawContext draw) Description copied from interface:EmiRecipeHandlerRender feedback about the status of the current fill. Common use is to render an overlay on missing ingredients- Specified by:
renderin interfaceEmiRecipeHandler<T extends Container>
-
renderMissing
@Internal static void renderMissing(EmiRecipe recipe, EmiPlayerInventory inv, List<Widget> widgets, DrawContext draw) -
getAvailable
@Internal static Map<EmiIngredient,Boolean> getAvailable(EmiRecipe recipe, EmiPlayerInventory inventory)
-