aboutsummaryrefslogtreecommitdiff
path: root/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/DisplayHelper.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-12-11 20:24:47 +0800
committershedaniel <daniel@shedaniel.me>2020-12-11 20:24:47 +0800
commit90b8a8181eb7e642fb88832f8bd8baa3acdcf804 (patch)
tree85774b5a26be6a8303f99c5316aee320a737ffc8 /RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/DisplayHelper.java
parent14edd7e3f9e3716ff60e9d918760049c1313a485 (diff)
downloadRoughlyEnoughItems-90b8a8181eb7e642fb88832f8bd8baa3acdcf804.tar.gz
RoughlyEnoughItems-90b8a8181eb7e642fb88832f8bd8baa3acdcf804.tar.bz2
RoughlyEnoughItems-90b8a8181eb7e642fb88832f8bd8baa3acdcf804.zip
Remove deprecated classes
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/DisplayHelper.java')
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/DisplayHelper.java126
1 files changed, 0 insertions, 126 deletions
diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/DisplayHelper.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/DisplayHelper.java
index cdafd0ba2..d63896203 100644
--- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/DisplayHelper.java
+++ b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/DisplayHelper.java
@@ -25,16 +25,13 @@ package me.shedaniel.rei.api;
import me.shedaniel.math.Rectangle;
import me.shedaniel.rei.gui.config.DisplayPanelLocation;
-import me.shedaniel.rei.gui.config.SearchFieldLocation;
import me.shedaniel.rei.impl.Internals;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
-import net.minecraft.world.InteractionResult;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import java.util.List;
-import java.util.function.Supplier;
@Environment(EnvType.CLIENT)
public interface DisplayHelper {
@@ -47,17 +44,6 @@ public interface DisplayHelper {
return Internals.getDisplayHelper();
}
- /**
- * Gets the sorted version of all responsible bounds handlers
- *
- * @param screenClass the class for checking responsible bounds handlers
- * @return the sorted list of responsible bounds handlers
- * @see DisplayHelper#getResponsibleBoundsHandler(Class) for the unsorted version
- */
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- List<DisplayBoundsHandler<?>> getSortedBoundsHandlers(Class<?> screenClass);
-
List<OverlayDecider> getSortedOverlayDeciders(Class<?> screenClass);
/**
@@ -68,17 +54,6 @@ public interface DisplayHelper {
List<OverlayDecider> getAllOverlayDeciders();
/**
- * Gets the responsible bounds handlers
- *
- * @param screenClass the class for checking responsible bounds handlers
- * @return the the list of responsible bounds handlers
- * @see DisplayHelper#getSortedBoundsHandlers(Class) for the sorted version
- */
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- DisplayBoundsHandler<?> getResponsibleBoundsHandler(Class<?> screenClass);
-
- /**
* Registers a bounds decider
*
* @param decider the decider to register
@@ -122,105 +97,4 @@ public interface DisplayHelper {
return getBaseSupportedClass().isAssignableFrom(screen);
}
}
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- interface DisplayBoundsHandler<T> extends OverlayDecider {
- /**
- * Gets the base supported class for the bounds handler
- *
- * @return the base class
- */
- Class<?> getBaseSupportedClass();
-
- @Override
- default boolean isHandingScreen(Class<?> screen) {
- return getBaseSupportedClass().isAssignableFrom(screen);
- }
-
- /**
- * Gets the left bounds of the overlay
- *
- * @param screen the current screen
- * @return the left bounds
- */
- Rectangle getLeftBounds(T screen);
-
- /**
- * Gets the right bounds of the overlay
- *
- * @param screen the current screen
- * @return the right bounds
- */
- Rectangle getRightBounds(T screen);
-
- /**
- * Checks if item slot can fit the screen
- *
- * @param left the left x coordinates of the stack
- * @param top the top y coordinates for the stack
- * @param screen the current screen
- * @param fullBounds the current bounds
- * @return whether the item slot can fit
- * @see BaseBoundsHandler#registerExclusionZones(Class, Supplier) for easier api
- */
- default InteractionResult canItemSlotWidgetFit(int left, int top, T screen, Rectangle fullBounds) {
- InteractionResult fit;
- fit = isInZone(left, top);
- if (fit != InteractionResult.PASS)
- return fit;
- fit = isInZone(left + 18, top);
- if (fit != InteractionResult.PASS)
- return fit;
- fit = isInZone(left, top + 18);
- if (fit != InteractionResult.PASS)
- return fit;
- fit = isInZone(left + 18, top + 18);
- return fit;
- }
-
- @Override
- default InteractionResult isInZone(double mouseX, double mouseY) {
- return OverlayDecider.super.isInZone(mouseX, mouseY);
- }
-
- /**
- * Gets the item list bounds by the overlay bounds
- *
- * @param rectangle the overlay bounds
- * @return the item list bounds
- */
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default Rectangle getItemListArea(Rectangle rectangle) {
- return new Rectangle(rectangle.x + 1, rectangle.y + 2 + (ConfigObject.getInstance().getSearchFieldLocation() == SearchFieldLocation.TOP_SIDE ? 24 : 0) + (ConfigObject.getInstance().isEntryListWidgetScrolled() ? 0 : 22), rectangle.width - 2, rectangle.height - (ConfigObject.getInstance().getSearchFieldLocation() != SearchFieldLocation.CENTER ? 27 + 22 : 27) + (!ConfigObject.getInstance().isEntryListWidgetScrolled() ? 0 : 22));
- }
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default Rectangle getFavoritesListArea(Rectangle rectangle) {
- int offset = 31 + (ConfigObject.getInstance().doesShowUtilsButtons() ? 25 : 0);
- return new Rectangle(rectangle.x + 1, rectangle.y + 2 + offset, rectangle.width - 2, rectangle.height - 5 - offset);
- }
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default boolean shouldRecalculateArea(boolean isOnRightSide, Rectangle rectangle) {
- return false;
- }
-
- @Override
- default boolean shouldRecalculateArea(DisplayPanelLocation location, Rectangle rectangle) {
- return shouldRecalculateArea(location == DisplayPanelLocation.RIGHT, rectangle);
- }
-
- /**
- * Gets the priority of the handler, the higher it is, the earlier it is called.
- *
- * @return the priority in float
- */
- @Override
- float getPriority();
- }
-
}