Package emi.dev.emi.emi.handler
Class InventoryRecipeHandler
java.lang.Object
emi.dev.emi.emi.handler.InventoryRecipeHandler
- All Implemented Interfaces:
EmiRecipeHandler<PlayerContainer>,StandardRecipeHandler<PlayerContainer>
public class InventoryRecipeHandler
extends Object
implements StandardRecipeHandler<PlayerContainer>
-
Field Summary
FieldsFields inherited from interface emi.dev.emi.emi.api.recipe.handler.EmiRecipeHandler
NOT_ENOUGH_INGREDIENTS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanCraft(EmiRecipe recipe, EmiCraftContext<PlayerContainer> context) getCraftingSlots(PlayerContainer handler) getCraftingSlots(EmiRecipe recipe, PlayerContainer handler) getInputSources(PlayerContainer handler) @Nullable SlotgetOutputSlot(PlayerContainer handler) getTooltip(EmiRecipe recipe, EmiCraftContext<PlayerContainer> context) booleansupportsRecipe(EmiRecipe recipe) 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.recipe.handler.EmiRecipeHandler
alwaysDisplaySupportMethods inherited from interface emi.dev.emi.emi.api.recipe.handler.StandardRecipeHandler
craft, getInventory, render
-
Field Details
-
TOO_SMALL
-
-
Constructor Details
-
InventoryRecipeHandler
public InventoryRecipeHandler()
-
-
Method Details
-
getInputSources
- Specified by:
getInputSourcesin interfaceStandardRecipeHandler<PlayerContainer>- Returns:
- The slots for the recipe handler to source ingredients from. Typically this should include the player's inventory, and crafting slots.
-
getCraftingSlots
- Specified by:
getCraftingSlotsin interfaceStandardRecipeHandler<PlayerContainer>- Returns:
- The slots where inputs should be placed to perform crafting.
-
getCraftingSlots
- Specified by:
getCraftingSlotsin interfaceStandardRecipeHandler<PlayerContainer>- Returns:
- The slots where inputs should be placed to perform crafting for a particular context.
-
getOutputSlot
- Specified by:
getOutputSlotin interfaceStandardRecipeHandler<PlayerContainer>- 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.
-
supportsRecipe
- Specified by:
supportsRecipein interfaceEmiRecipeHandler<PlayerContainer>- Returns:
- Whether the handler is applicable for the provided recipe.
-
canCraft
- Specified by:
canCraftin interfaceEmiRecipeHandler<PlayerContainer>- Specified by:
canCraftin interfaceStandardRecipeHandler<PlayerContainer>- Returns:
- Whether the handler can craft the provided recipe with the given context
-
getTooltip
public List<TooltipComponent> getTooltip(EmiRecipe recipe, EmiCraftContext<PlayerContainer> context) - Specified by:
getTooltipin interfaceEmiRecipeHandler<PlayerContainer>- Returns:
- The tooltip describing status for crafting the recipe
-