diff options
Diffstat (limited to 'src/main/java/me/shedaniel/rei/api/OverlayDecider.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/api/OverlayDecider.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/me/shedaniel/rei/api/OverlayDecider.java b/src/main/java/me/shedaniel/rei/api/OverlayDecider.java index 9f20f8223..500d9f058 100644 --- a/src/main/java/me/shedaniel/rei/api/OverlayDecider.java +++ b/src/main/java/me/shedaniel/rei/api/OverlayDecider.java @@ -23,8 +23,12 @@ package me.shedaniel.rei.api; +import me.shedaniel.math.Rectangle; +import me.shedaniel.rei.gui.config.DisplayPanelLocation; import net.minecraft.util.ActionResult; +import static net.minecraft.util.ActionResult.PASS; + public interface OverlayDecider { boolean isHandingScreen(Class<?> screen); @@ -40,4 +44,26 @@ public interface OverlayDecider { default float getPriority() { return 0f; } + + /** + * Checks if REI should recalculate the overlay bounds + * + * @param location the location of the display panel + * @param rectangle the current overlay bounds + * @return whether REI should recalculate the overlay bounds + */ + default boolean shouldRecalculateArea(DisplayPanelLocation location, Rectangle rectangle) { + return false; + } + + /** + * Checks if mouse is inside the overlay + * + * @param mouseX mouse's x coordinates + * @param mouseY mouse's y coordinates + * @return whether mouse is inside the overlay + */ + default ActionResult isInZone(double mouseX, double mouseY) { + return PASS; + } } |
