DisplayVisibilityHandler.java 912 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Roughly Enough Items by Danielshe.
  3. * Licensed under the MIT License.
  4. */
  5. package me.shedaniel.rei.api;
  6. public interface DisplayVisibilityHandler {
  7. /**
  8. * Gets the priority of the handler
  9. *
  10. * @return the priority
  11. */
  12. default float getPriority() {
  13. return 0f;
  14. }
  15. /**
  16. * Handles the visibility of the display.
  17. * {@link DisplayVisibility#PASS} to pass the handling to another handler
  18. * {@link DisplayVisibility#ALWAYS_VISIBLE} to always display it
  19. * {@link DisplayVisibility#CONFIG_OPTIONAL} to allow user to configure the visibility
  20. * {@link DisplayVisibility#NEVER_VISIBLE} to never display it
  21. *
  22. * @param category the category of the display
  23. * @param display the display of the recipe
  24. * @return the visibility
  25. */
  26. DisplayVisibility handleDisplay(RecipeCategory category, RecipeDisplay display);
  27. }