Package emi.dev.emi.emi.api.recipe
Interface EmiRecipe
- All Known Implementing Classes:
BasicEmiRecipe,EmiArmorDyeRecipe,EmiBatingRecipe,EmiBrewingRecipe,EmiBulkRecipe,EmiCampfireRecipe,EmiChoppingRecipe,EmiCookingRecipe,EmiCraftingRecipe,EmiFireworkRocketRecipe,EmiFireworkStarFadeRecipe,EmiFireworkStarRecipe,EmiFoodRecipe,EmiFuelRecipe,EmiHopperFilteringRecipe,EmiHopperRecipe,EmiInfoRecipe,EmiIngredientRecipe,EmiKilnRecipe,EmiKnittingRecipe,EmiMapCloningRecipe,EmiPatternCraftingRecipe,EmiPistonRecipe,EmiProgressiveRecipe,EmiRepairItemRecipe,EmiResolutionRecipe,EmiSawRecipe,EmiShapedRecipe,EmiShapelessRecipe,EmiSheepRecipe,EmiSoulforgeRecipe,EmiSyntheticIngredientRecipe,EmiTagRecipe,EmiTradeRecipe,EmiTurntableRecipe,EmiWoolArmorRecipe,EmiWoolBlockRecipe,EmiWorldInteractionRecipe
public interface EmiRecipe
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddWidgets(WidgetHolder widgets) Called to add widgets that display the recipe.default List<EmiIngredient>intint@Nullable ResourceLocationgetId()default booleandefault boolean
-
Method Details
-
getCategory
EmiRecipeCategory getCategory()- Returns:
- The recipe category this recipe should be displayed under. This is used for grouping in the recipe screen, as well as category display in the recipe tree.
-
getId
- Returns:
- The unique id of the recipe, or null. If null, the recipe cannot be serialized.
-
getInputs
List<EmiIngredient> getInputs()- Returns:
- A list of ingredients required for the recipe. Inputs will consider this recipe a use when exploring recipes.
-
getCatalysts
- Returns:
- A list of ingredients associated with the creation of the recipe. Catalysts are considered the same as workstations in the recipe, not broken down as a requirement. However, catalysts will consider this recipe a use when exploring recipes.
-
getOutputs
- Returns:
- A list of stacks that are created after a craft. Outputs will consider this recipe a source when exploring recipes.
-
getDisplayWidth
int getDisplayWidth()- Returns:
- The width taken up by the recipe's widgets EMI will grow to accomodate requested width. To fit within the default width, recipes should request a width of 134. If a recipe does not support the recipe tree or recipe filling, EMI will not need to add buttons, and it will have space for a width of 160.
-
getDisplayHeight
int getDisplayHeight()- Returns:
- The maximum height taken up by the recipe's widgets.
Vertical screen space is capped, however, and EMI may opt to provide less vertical space.
SeeWidgetHolder.getHeight()when adding widgets for the EMI adjusted height.
-
addWidgets
Called to add widgets that display the recipe. Can be used in several places, including the main recipe screen, and tooltips. It is worth noting that EMI cannot grow vertically, so recipes with large heights may be provided less space than requested if they span more than the entire vertical space available in the recipe scren. In the case of very large heights, recipes should respectWidgetHolder.getHeight(). -
supportsRecipeTree
default boolean supportsRecipeTree()- Returns:
- Whether the recipe supports the recipe tree. Recipes that do not represent a set of inputs producing a set of outputs should exclude themselves. Example for unsupportable recipes are pattern based recipes, like arbitrary dying.
-
hideCraftable
default boolean hideCraftable()- Returns:
- Whether the recipe should be hidden from the craftable menu. This is desirable behavior for recipes that are reimplementations of vanilla recipes in other workstations.
-