Package emi.dev.emi.emi.api.recipe
Class BasicEmiRecipe
java.lang.Object
emi.dev.emi.emi.api.recipe.BasicEmiRecipe
- All Implemented Interfaces:
EmiRecipe
A convenience type for easy implementation of
EmiRecipe-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<EmiIngredient>protected EmiRecipeCategoryprotected intprotected ResourceLocationprotected List<EmiIngredient>protected int -
Constructor Summary
ConstructorsConstructorDescriptionBasicEmiRecipe(EmiRecipeCategory category, ResourceLocation id, int width, int height) -
Method Summary
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.EmiRecipe
addWidgets, hideCraftable, supportsRecipeTree
-
Field Details
-
inputs
-
catalysts
-
outputs
-
category
-
id
-
width
protected int width -
height
protected int height
-
-
Constructor Details
-
BasicEmiRecipe
-
-
Method Details
-
getCategory
- Specified by:
getCategoryin interfaceEmiRecipe- 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
-
getInputs
-
getCatalysts
- Specified by:
getCatalystsin interfaceEmiRecipe- 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
- Specified by:
getOutputsin interfaceEmiRecipe- Returns:
- A list of stacks that are created after a craft. Outputs will consider this recipe a source when exploring recipes.
-
getDisplayWidth
public int getDisplayWidth()- Specified by:
getDisplayWidthin interfaceEmiRecipe- 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
public int getDisplayHeight()- Specified by:
getDisplayHeightin interfaceEmiRecipe- 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.
-