aboutsummaryrefslogtreecommitdiff
path: root/api/src/main/java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2022-01-16 03:23:22 +0800
committershedaniel <daniel@shedaniel.me>2022-01-16 03:57:36 +0800
commitef83d960d98dd8e508bcd2035ef8949670918800 (patch)
tree8bf29b9ce56be2aa70f311c5a91a581a59795815 /api/src/main/java
parentac6e36b616e8412a4db17c985bc9c0021a0ef05f (diff)
downloadRoughlyEnoughItems-ef83d960d98dd8e508bcd2035ef8949670918800.tar.gz
RoughlyEnoughItems-ef83d960d98dd8e508bcd2035ef8949670918800.tar.bz2
RoughlyEnoughItems-ef83d960d98dd8e508bcd2035ef8949670918800.zip
Technically fix #611, would need CPAS to use the new methods
Diffstat (limited to 'api/src/main/java')
-rw-r--r--api/src/main/java/me/shedaniel/rei/api/client/registry/screen/ExclusionZones.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/api/src/main/java/me/shedaniel/rei/api/client/registry/screen/ExclusionZones.java b/api/src/main/java/me/shedaniel/rei/api/client/registry/screen/ExclusionZones.java
index cdddcae18..19a58c430 100644
--- a/api/src/main/java/me/shedaniel/rei/api/client/registry/screen/ExclusionZones.java
+++ b/api/src/main/java/me/shedaniel/rei/api/client/registry/screen/ExclusionZones.java
@@ -26,6 +26,7 @@ package me.shedaniel.rei.api.client.registry.screen;
import me.shedaniel.math.Rectangle;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
+import net.minecraft.client.gui.screens.Screen;
import java.util.List;
@@ -36,7 +37,9 @@ public interface ExclusionZones extends OverlayDecider {
*
* @param currentScreenClass the current screen class
* @return the list of exclusion zones
+ * @deprecated use the screen instance instead
*/
+ @Deprecated
default List<Rectangle> getExclusionZones(Class<?> currentScreenClass) {
return getExclusionZones(currentScreenClass, false);
}
@@ -46,9 +49,29 @@ public interface ExclusionZones extends OverlayDecider {
*
* @param currentScreenClass the current screen class
* @return the list of exclusion zones
+ * @deprecated use the screen instance instead
*/
+ @Deprecated
List<Rectangle> getExclusionZones(Class<?> currentScreenClass, boolean sort);
+ /**
+ * Returns the exclusion zones by the screen
+ *
+ * @param screen the screen
+ * @return the list of exclusion zones
+ */
+ default List<Rectangle> getExclusionZones(Screen screen) {
+ return getExclusionZones(screen, false);
+ }
+
+ /**
+ * Returns the exclusion zones by the screen
+ *
+ * @param screen the screen
+ * @return the list of exclusion zones
+ */
+ List<Rectangle> getExclusionZones(Screen screen, boolean sort);
+
int getZonesCount();
/**