Class EmiTooltipComponents

java.lang.Object
emi.dev.emi.emi.api.render.EmiTooltipComponents

public class EmiTooltipComponents extends Object
  • Constructor Details

    • EmiTooltipComponents

      public EmiTooltipComponents()
  • Method Details

    • getRecipeTooltipComponent

      public static TooltipComponent getRecipeTooltipComponent(EmiRecipe recipe)
      Returns:
      A tooltip component that displays a provided recipe.
    • getRemainderTooltipComponent

      public static TooltipComponent getRemainderTooltipComponent(EmiIngredient ingredient)
      Returns:
      A tooltip component that displays the remainder of a provided ingredient.
    • getRecipeCostTooltipComponent

      public static TooltipComponent getRecipeCostTooltipComponent(EmiRecipe recipe)
      Returns:
      A tooltip component that displays the the cost breakdown of a provided recipe.
    • getIngredientTooltipComponent

      public static TooltipComponent getIngredientTooltipComponent(List<? extends EmiIngredient> stacks)
      Returns:
      A tooltip component that displays a collection of stacks to represent an ingredient
    • getAmount

      public static TooltipComponent getAmount(EmiIngredient ingredient)
      Returns:
      A tooltip component that displays the amount of a provided stack.
    • of

      public static TooltipComponent of(Text text)
      A shorthand to create a tooltip component from text
    • appendModName

      public static void appendModName(List<TooltipComponent> components, String namespace)
      Appends a mod name to a list of components based on a namespace. Takes into consideration config options and formatting. EMI's config allows users to disable displaying mod names, so it is possible for the list of components to be unchanged.