Class EmiSawRecipe

java.lang.Object
emi.dev.emi.emi.recipe.btw.EmiSawRecipe
All Implemented Interfaces:
EmiRecipe

public class EmiSawRecipe extends Object implements EmiRecipe
  • Field Details

  • Constructor Details

    • EmiSawRecipe

      public EmiSawRecipe(SawRecipe recipe)
  • Method Details

    • getCategory

      public EmiRecipeCategory getCategory()
      Specified by:
      getCategory in interface EmiRecipe
      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

      @Nullable public @Nullable ResourceLocation getId()
      Specified by:
      getId in interface EmiRecipe
      Returns:
      The unique id of the recipe, or null. If null, the recipe cannot be serialized.
    • getInputs

      public List<EmiIngredient> getInputs()
      Specified by:
      getInputs in interface EmiRecipe
      Returns:
      A list of ingredients required for the recipe. Inputs will consider this recipe a use when exploring recipes.
    • getOutputs

      public List<EmiStack> getOutputs()
      Specified by:
      getOutputs in interface EmiRecipe
      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:
      getDisplayWidth in interface EmiRecipe
      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:
      getDisplayHeight in interface EmiRecipe
      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.
      See WidgetHolder.getHeight() when adding widgets for the EMI adjusted height.
    • addWidgets

      public void addWidgets(WidgetHolder widgets)
      Description copied from interface: EmiRecipe
      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 respect WidgetHolder.getHeight().
      Specified by:
      addWidgets in interface EmiRecipe