BaseBoundsHandler.java 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Roughly Enough Items by Danielshe.
  3. * Licensed under the MIT License.
  4. */
  5. package me.shedaniel.rei.api;
  6. import net.minecraft.client.gui.screen.Screen;
  7. import java.awt.*;
  8. import java.util.List;
  9. public interface BaseBoundsHandler extends DisplayHelper.DisplayBoundsHandler<Screen> {
  10. /**
  11. * Gets the exclusion zones by the screen class
  12. *
  13. * @param currentScreenClass the current screen class
  14. * @param isOnRightSide whether the user has set the overlay to the right
  15. * @return the list of exclusion zones
  16. */
  17. List<Rectangle> getCurrentExclusionZones(Class<? extends Screen> currentScreenClass, boolean isOnRightSide);
  18. /**
  19. * Register an exclusion zone
  20. *
  21. * @param screenClass the screen
  22. * @param supplier the exclusion zone supplier
  23. */
  24. void registerExclusionZones(Class<? extends Screen> screenClass, ExclusionZoneSupplier supplier);
  25. public static interface ExclusionZoneSupplier {
  26. /**
  27. * Gets the current exclusion zones
  28. *
  29. * @param isOnRightSide whether the user has set the overlay to the right
  30. * @return the list of exclusion zones
  31. */
  32. List<Rectangle> apply(boolean isOnRightSide);
  33. }
  34. }