From 90b8a8181eb7e642fb88832f8bd8baa3acdcf804 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Fri, 11 Dec 2020 20:24:47 +0800 Subject: Remove deprecated classes Signed-off-by: shedaniel --- .../java/me/shedaniel/rei/api/DisplayHelper.java | 126 --------------------- 1 file changed, 126 deletions(-) (limited to 'RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/DisplayHelper.java') 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> getSortedBoundsHandlers(Class screenClass); - List getSortedOverlayDeciders(Class screenClass); /** @@ -67,17 +53,6 @@ public interface DisplayHelper { */ List 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 * @@ -122,105 +97,4 @@ public interface DisplayHelper { return getBaseSupportedClass().isAssignableFrom(screen); } } - - @Deprecated - @ApiStatus.ScheduledForRemoval - interface DisplayBoundsHandler 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(); - } - } -- cgit