aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/api/BaseBoundsHandler.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-01-17 14:31:30 +0800
committershedaniel <daniel@shedaniel.me>2020-01-17 14:31:30 +0800
commit7a1cf35934ef14c04f884fe6ae34282e1d6243ba (patch)
treee84d0c5bfb9929f065544e96ecc1fb07d3496c29 /src/main/java/me/shedaniel/rei/api/BaseBoundsHandler.java
parentb4be45e414504afb49910d766bebcd00f55b052b (diff)
downloadRoughlyEnoughItems-7a1cf35934ef14c04f884fe6ae34282e1d6243ba.tar.gz
RoughlyEnoughItems-7a1cf35934ef14c04f884fe6ae34282e1d6243ba.tar.bz2
RoughlyEnoughItems-7a1cf35934ef14c04f884fe6ae34282e1d6243ba.zip
3.3.12
Diffstat (limited to 'src/main/java/me/shedaniel/rei/api/BaseBoundsHandler.java')
-rw-r--r--src/main/java/me/shedaniel/rei/api/BaseBoundsHandler.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/me/shedaniel/rei/api/BaseBoundsHandler.java b/src/main/java/me/shedaniel/rei/api/BaseBoundsHandler.java
index 84b8574a6..4f2c3480c 100644
--- a/src/main/java/me/shedaniel/rei/api/BaseBoundsHandler.java
+++ b/src/main/java/me/shedaniel/rei/api/BaseBoundsHandler.java
@@ -9,6 +9,7 @@ import com.google.common.collect.Lists;
import me.shedaniel.math.api.Rectangle;
import me.shedaniel.rei.RoughlyEnoughItemsCore;
import net.minecraft.client.gui.screen.Screen;
+import org.jetbrains.annotations.ApiStatus;
import java.util.List;
import java.util.function.Function;
@@ -23,11 +24,13 @@ public interface BaseBoundsHandler extends DisplayHelper.DisplayBoundsHandler<Sc
* @return the list of exclusion zones
*/
@Deprecated
+ @ApiStatus.ScheduledForRemoval
default List<Rectangle> getCurrentExclusionZones(Class<?> currentScreenClass, boolean isOnRightSide) {
return getExclusionZones(currentScreenClass, false);
}
@Deprecated
+ @ApiStatus.ScheduledForRemoval
default List<Rectangle> getCurrentExclusionZones(Class<?> currentScreenClass, boolean isOnRightSide, boolean sort) {
return getExclusionZones(currentScreenClass, sort);
}
@@ -41,8 +44,10 @@ public interface BaseBoundsHandler extends DisplayHelper.DisplayBoundsHandler<Sc
*
* @param screenClass the screen
* @param supplier the exclusion zone supplier, isOnRightSide -> the list of exclusion zones
+ * @see #registerExclusionZones(Class, Supplier) for non deprecated version
*/
@Deprecated
+ @ApiStatus.ScheduledForRemoval
default void registerExclusionZones(Class<?> screenClass, Function<Boolean, List<Rectangle>> supplier) {
RoughlyEnoughItemsCore.LOGGER.warn("[REI] Someone is registering exclusion zones with the deprecated method: " + supplier.getClass().getName());
registerExclusionZones(screenClass, () -> {
@@ -52,6 +57,12 @@ public interface BaseBoundsHandler extends DisplayHelper.DisplayBoundsHandler<Sc
});
}
+ /**
+ * Register an exclusion zone
+ *
+ * @param screenClass the screen
+ * @param supplier the exclusion zone supplier, returns the list of exclusion zones
+ */
void registerExclusionZones(Class<?> screenClass, Supplier<List<Rectangle>> supplier);
}