DisplaySettings.java 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Roughly Enough Items by Danielshe.
  3. * Licensed under the MIT License.
  4. */
  5. package me.shedaniel.rei.api;
  6. public interface DisplaySettings<T extends RecipeDisplay> {
  7. /**
  8. * Gets the recipe display height
  9. *
  10. * @param category the category of the display
  11. * @return the height
  12. */
  13. int getDisplayHeight(RecipeCategory category);
  14. /**
  15. * Gets the recipe display width
  16. *
  17. * @param category the category of the display
  18. * @param display the display of the recipe
  19. * @return the width
  20. */
  21. int getDisplayWidth(RecipeCategory category, T display);
  22. /**
  23. * Gets the maximum amount of recipe displays of the category displayed at the same time.
  24. * @param category the category of the displays
  25. * @return the maximum amount
  26. */
  27. int getMaximumRecipePerPage(RecipeCategory category);
  28. /**
  29. * Gets the fixed amount of recipes per page.
  30. * @return the amount of recipes, returns -1 if not fixed
  31. */
  32. default int getFixedRecipesPerPage() {
  33. return -1;
  34. }
  35. }