aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-03-19 04:22:55 +0800
committershedaniel <daniel@shedaniel.me>2020-03-19 04:22:55 +0800
commit1764648e4f536b2e6ac1b7d1cb3c3fb60e206b29 (patch)
treedec596bfe19105554b2c8a9b3045f0431f495fa3 /src/main
parentaadcd2bc3a457ed0dfc03ad7be5ea9a3500c27c4 (diff)
downloadRoughlyEnoughItems-1764648e4f536b2e6ac1b7d1cb3c3fb60e206b29.tar.gz
RoughlyEnoughItems-1764648e4f536b2e6ac1b7d1cb3c3fb60e206b29.tar.bz2
RoughlyEnoughItems-1764648e4f536b2e6ac1b7d1cb3c3fb60e206b29.zip
remove old Rectangle
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/me/shedaniel/rei/api/AutoTransferHandler.java28
-rw-r--r--src/main/java/me/shedaniel/rei/api/BaseBoundsHandler.java6
-rw-r--r--src/main/java/me/shedaniel/rei/api/ButtonAreaSupplier.java2
-rw-r--r--src/main/java/me/shedaniel/rei/api/ConfigManager.java13
-rw-r--r--src/main/java/me/shedaniel/rei/api/ConfigObject.java4
-rw-r--r--src/main/java/me/shedaniel/rei/api/DisplayHelper.java39
-rw-r--r--src/main/java/me/shedaniel/rei/api/EntryStack.java17
-rw-r--r--src/main/java/me/shedaniel/rei/api/OptimalEntryStack.java2
-rw-r--r--src/main/java/me/shedaniel/rei/api/REIHelper.java11
-rw-r--r--src/main/java/me/shedaniel/rei/api/RecipeCategory.java44
-rw-r--r--src/main/java/me/shedaniel/rei/api/RecipeHelper.java3
-rw-r--r--src/main/java/me/shedaniel/rei/api/TransferRecipeCategory.java2
-rw-r--r--src/main/java/me/shedaniel/rei/api/widgets/Button.java2
-rw-r--r--src/main/java/me/shedaniel/rei/api/widgets/Slot.java12
-rw-r--r--src/main/java/me/shedaniel/rei/api/widgets/Tooltip.java4
-rw-r--r--src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java4
-rw-r--r--src/main/java/me/shedaniel/rei/gui/OverlaySearchField.java2
-rw-r--r--src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java4
-rw-r--r--src/main/java/me/shedaniel/rei/gui/RecipeDisplayExporter.java2
-rw-r--r--src/main/java/me/shedaniel/rei/gui/RecipeViewingScreen.java4
-rw-r--r--src/main/java/me/shedaniel/rei/gui/VillagerRecipeViewingScreen.java4
-rw-r--r--src/main/java/me/shedaniel/rei/gui/config/entry/FilteringEntry.java4
-rw-r--r--src/main/java/me/shedaniel/rei/gui/entries/RecipeEntry.java10
-rw-r--r--src/main/java/me/shedaniel/rei/gui/entries/SimpleRecipeEntry.java2
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java4
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/CategoryBaseWidget.java2
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/ClickableLabelWidget.java8
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/DraggableWidget.java4
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/EntryListWidget.java4
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/EntryWidget.java4
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/FavoritesListWidget.java4
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/LabelWidget.java30
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/PanelWidget.java2
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/QueuedTooltip.java23
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/RecipeArrowWidget.java4
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/RecipeBaseWidget.java2
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/RecipeChoosePageWidget.java4
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/SlotBaseWidget.java2
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java2
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java2
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/Widget.java9
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/WidgetWithBounds.java2
-rw-r--r--src/main/java/me/shedaniel/rei/impl/BaseBoundsHandlerImpl.java2
-rw-r--r--src/main/java/me/shedaniel/rei/impl/DisplayHelperImpl.java5
-rw-r--r--src/main/java/me/shedaniel/rei/impl/EmptyEntryStack.java2
-rw-r--r--src/main/java/me/shedaniel/rei/impl/FluidEntryStack.java2
-rw-r--r--src/main/java/me/shedaniel/rei/impl/InternalWidgets.java2
-rw-r--r--src/main/java/me/shedaniel/rei/impl/ItemEntryStack.java2
-rw-r--r--src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java2
-rw-r--r--src/main/java/me/shedaniel/rei/impl/RenderingEntry.java10
-rw-r--r--src/main/java/me/shedaniel/rei/impl/ScreenHelper.java43
-rw-r--r--src/main/java/me/shedaniel/rei/impl/widgets/ArrowWidget.java2
-rw-r--r--src/main/java/me/shedaniel/rei/impl/widgets/BurningFireWidget.java2
-rw-r--r--src/main/java/me/shedaniel/rei/impl/widgets/ButtonWidget.java4
-rw-r--r--src/main/java/me/shedaniel/rei/impl/widgets/LabelWidget.java2
-rw-r--r--src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java8
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java2
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/DefaultPotionEffectExclusionZones.java2
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/DefaultRecipeBookExclusionZones.java2
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/beacon/DefaultBeaconBaseCategory.java9
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/composting/DefaultCompostingCategory.java2
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingCategory.java2
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/crafting/DefaultCraftingCategory.java2
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/fuel/DefaultFuelCategory.java3
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/information/DefaultInformationCategory.java11
-rw-r--r--src/main/java/me/shedaniel/rei/server/ContainerInfoHandler.java3
66 files changed, 101 insertions, 362 deletions
diff --git a/src/main/java/me/shedaniel/rei/api/AutoTransferHandler.java b/src/main/java/me/shedaniel/rei/api/AutoTransferHandler.java
index 63f1d08a1..e494aae65 100644
--- a/src/main/java/me/shedaniel/rei/api/AutoTransferHandler.java
+++ b/src/main/java/me/shedaniel/rei/api/AutoTransferHandler.java
@@ -25,8 +25,6 @@ package me.shedaniel.rei.api;
import it.unimi.dsi.fastutil.ints.IntArrayList;
import it.unimi.dsi.fastutil.ints.IntList;
-import me.shedaniel.rei.gui.ContainerScreenOverlay;
-import me.shedaniel.rei.impl.ScreenHelper;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.ingame.HandledScreen;
import net.minecraft.screen.ScreenHandler;
@@ -94,34 +92,10 @@ public interface AutoTransferHandler {
HandledScreen<?> getHandledScreen();
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default HandledScreen<?> getScreenWithHandler() {
- return getHandledScreen();
- }
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default HandledScreen<?> getContainerScreen() {
- return getHandledScreen();
- }
-
RecipeDisplay getRecipe();
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default ScreenHandler getContainer() {
- return getScreenHandler();
- }
-
default ScreenHandler getScreenHandler() {
- return getScreenWithHandler().getScreenHandler();
- }
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default ContainerScreenOverlay getOverlay() {
- return ScreenHelper.getLastOverlay();
+ return getHandledScreen().getScreenHandler();
}
}
diff --git a/src/main/java/me/shedaniel/rei/api/BaseBoundsHandler.java b/src/main/java/me/shedaniel/rei/api/BaseBoundsHandler.java
index e44e7dd9e..7ba78120b 100644
--- a/src/main/java/me/shedaniel/rei/api/BaseBoundsHandler.java
+++ b/src/main/java/me/shedaniel/rei/api/BaseBoundsHandler.java
@@ -23,7 +23,8 @@
package me.shedaniel.rei.api;
-import me.shedaniel.math.api.Rectangle;
+import me.shedaniel.math.Rectangle;
+import me.shedaniel.rei.impl.DisplayHelperImpl;
import net.minecraft.client.gui.screen.Screen;
import java.util.List;
@@ -31,9 +32,8 @@ import java.util.function.Supplier;
public interface BaseBoundsHandler extends DisplayHelper.DisplayBoundsHandler<Screen> {
- @SuppressWarnings("deprecation")
static BaseBoundsHandler getInstance() {
- return DisplayHelper.getInstance().getBaseBoundsHandler();
+ return ((DisplayHelperImpl) DisplayHelper.getInstance()).getBaseBoundsHandler();
}
/**
diff --git a/src/main/java/me/shedaniel/rei/api/ButtonAreaSupplier.java b/src/main/java/me/shedaniel/rei/api/ButtonAreaSupplier.java
index 33488af45..df6214642 100644
--- a/src/main/java/me/shedaniel/rei/api/ButtonAreaSupplier.java
+++ b/src/main/java/me/shedaniel/rei/api/ButtonAreaSupplier.java
@@ -23,7 +23,7 @@
package me.shedaniel.rei.api;
-import me.shedaniel.math.api.Rectangle;
+import me.shedaniel.math.Rectangle;
/**
* The supplier for the + button area.
diff --git a/src/main/java/me/shedaniel/rei/api/ConfigManager.java b/src/main/java/me/shedaniel/rei/api/ConfigManager.java
index e171ffc3c..b3da456da 100644
--- a/src/main/java/me/shedaniel/rei/api/ConfigManager.java
+++ b/src/main/java/me/shedaniel/rei/api/ConfigManager.java
@@ -26,9 +26,6 @@ package me.shedaniel.rei.api;
import me.shedaniel.rei.RoughlyEnoughItemsCore;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.Screen;
-import org.jetbrains.annotations.ApiStatus;
-
-import java.util.List;
public interface ConfigManager {
@@ -40,16 +37,6 @@ public interface ConfigManager {
}
/**
- * @return the list of favourites
- * @deprecated {@link ConfigObject#getFavorites()}
- */
- @ApiStatus.ScheduledForRemoval
- @Deprecated
- default List<EntryStack> getFavorites() {
- return ConfigObject.getInstance().getFavorites();
- }
-
- /**
* Saves the config.
*/
void saveConfig();
diff --git a/src/main/java/me/shedaniel/rei/api/ConfigObject.java b/src/main/java/me/shedaniel/rei/api/ConfigObject.java
index 56c57125a..5070d2da0 100644
--- a/src/main/java/me/shedaniel/rei/api/ConfigObject.java
+++ b/src/main/java/me/shedaniel/rei/api/ConfigObject.java
@@ -93,10 +93,6 @@ public interface ConfigObject {
boolean areClickableRecipeArrowsEnabled();
- @ApiStatus.ScheduledForRemoval
- @Deprecated
- boolean isUsingLightGrayRecipeBorder();
-
RecipeBorderType getRecipeBorderType();
boolean doesVillagerScreenHavePermanentScrollBar();
diff --git a/src/main/java/me/shedaniel/rei/api/DisplayHelper.java b/src/main/java/me/shedaniel/rei/api/DisplayHelper.java
index 246850cc7..52936de0e 100644
--- a/src/main/java/me/shedaniel/rei/api/DisplayHelper.java
+++ b/src/main/java/me/shedaniel/rei/api/DisplayHelper.java
@@ -23,12 +23,10 @@
package me.shedaniel.rei.api;
-import me.shedaniel.math.api.Rectangle;
+import me.shedaniel.math.Rectangle;
import me.shedaniel.rei.RoughlyEnoughItemsCore;
import me.shedaniel.rei.gui.config.SearchFieldLocation;
-import me.shedaniel.rei.utils.CollectionUtils;
import net.minecraft.util.ActionResult;
-import org.jetbrains.annotations.ApiStatus;
import java.util.List;
import java.util.function.Supplier;
@@ -54,18 +52,6 @@ public interface DisplayHelper {
List<DisplayBoundsHandler<?>> getSortedBoundsHandlers(Class<?> screenClass);
/**
- * Gets all registered bounds handlers
- *
- * @return the list of registered bounds handlers
- * @deprecated see {@link #getAllOverlayDeciders()}
- */
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default List<DisplayBoundsHandler<?>> getAllBoundsHandlers() {
- return (List) CollectionUtils.castAndMap(getAllOverlayDeciders(), DisplayBoundsHandler.class);
- }
-
- /**
* Gets all registered overlay deciders
*
* @return the list of registered overlay deciders
@@ -82,35 +68,12 @@ public interface DisplayHelper {
DisplayBoundsHandler<?> getResponsibleBoundsHandler(Class<?> screenClass);
/**
- * Registers a bounds handler
- *
- * @param handler the handler to register
- * @deprecated see {@link #registerHandler(OverlayDecider)}
- */
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default void registerBoundsHandler(DisplayBoundsHandler<?> handler) {
- registerHandler(handler);
- }
-
- /**
* Registers a bounds decider
*
* @param decider the decider to register
*/
void registerHandler(OverlayDecider decider);
- /**
- * Gets the base bounds handler api for exclusion zones
- *
- * @return the base bounds handler
- * @deprecated {@link BaseBoundsHandler#getInstance()}
- */
- @ApiStatus.Internal
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- BaseBoundsHandler getBaseBoundsHandler();
-
interface DisplayBoundsHandler<T> extends OverlayDecider {
/**
* Gets the base supported class for the bounds handler
diff --git a/src/main/java/me/shedaniel/rei/api/EntryStack.java b/src/main/java/me/shedaniel/rei/api/EntryStack.java
index c2d5241e2..d09054ff5 100644
--- a/src/main/java/me/shedaniel/rei/api/EntryStack.java
+++ b/src/main/java/me/shedaniel/rei/api/EntryStack.java
@@ -26,9 +26,8 @@ package me.shedaniel.rei.api;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import me.shedaniel.math.Point;
-import me.shedaniel.math.api.Rectangle;
+import me.shedaniel.math.Rectangle;
import me.shedaniel.rei.api.widgets.Tooltip;
-import me.shedaniel.rei.gui.widget.QueuedTooltip;
import me.shedaniel.rei.impl.EmptyEntryStack;
import me.shedaniel.rei.impl.FluidEntryStack;
import me.shedaniel.rei.impl.ItemEntryStack;
@@ -231,23 +230,11 @@ public interface EntryStack {
<T> T get(Settings<T> settings);
- /**
- * @deprecated Use {@link #getTooltip(Point)}
- */
@Nullable
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default QueuedTooltip getTooltip(int mouseX, int mouseY) {
+ default Tooltip getTooltip(Point mouse) {
return null;
}
- @Nullable
- default Tooltip getTooltip(Point point) {
- QueuedTooltip tooltip = getTooltip(point.x, point.y);
- if (tooltip == null) return null;
- return Tooltip.create(new Point(tooltip.getX(), tooltip.getY()), tooltip.getText());
- }
-
void render(Rectangle bounds, int mouseX, int mouseY, float delta);
enum Type {
diff --git a/src/main/java/me/shedaniel/rei/api/OptimalEntryStack.java b/src/main/java/me/shedaniel/rei/api/OptimalEntryStack.java
index 3e65bc723..bade908d8 100644
--- a/src/main/java/me/shedaniel/rei/api/OptimalEntryStack.java
+++ b/src/main/java/me/shedaniel/rei/api/OptimalEntryStack.java
@@ -23,7 +23,7 @@
package me.shedaniel.rei.api;
-import me.shedaniel.math.api.Rectangle;
+import me.shedaniel.math.Rectangle;
import org.jetbrains.annotations.ApiStatus;
@ApiStatus.Internal
diff --git a/src/main/java/me/shedaniel/rei/api/REIHelper.java b/src/main/java/me/shedaniel/rei/api/REIHelper.java
index 5c8c80209..8a6c0461c 100644
--- a/src/main/java/me/shedaniel/rei/api/REIHelper.java
+++ b/src/main/java/me/shedaniel/rei/api/REIHelper.java
@@ -24,11 +24,9 @@
package me.shedaniel.rei.api;
import me.shedaniel.rei.api.widgets.Tooltip;
-import me.shedaniel.rei.gui.widget.QueuedTooltip;
import me.shedaniel.rei.gui.widget.TextFieldWidget;
import me.shedaniel.rei.impl.ScreenHelper;
import net.minecraft.item.ItemStack;
-import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;
import java.util.List;
@@ -48,15 +46,6 @@ public interface REIHelper {
List<ItemStack> getInventoryStacks();
- /**
- * @deprecated Use {@link #queueTooltip(Tooltip)} or {@link Tooltip#queue()}
- */
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default void addTooltip(@Nullable QueuedTooltip tooltip) {
- queueTooltip(tooltip);
- }
-
void queueTooltip(@Nullable Tooltip tooltip);
}
diff --git a/src/main/java/me/shedaniel/rei/api/RecipeCategory.java b/src/main/java/me/shedaniel/rei/api/RecipeCategory.java
index d491231b8..50cb7954b 100644
--- a/src/main/java/me/shedaniel/rei/api/RecipeCategory.java
+++ b/src/main/java/me/shedaniel/rei/api/RecipeCategory.java
@@ -25,18 +25,14 @@ package me.shedaniel.rei.api;
import me.shedaniel.math.Rectangle;
import me.shedaniel.rei.api.widgets.Widgets;
-import me.shedaniel.rei.gui.RecipeViewingScreen;
import me.shedaniel.rei.gui.entries.RecipeEntry;
import me.shedaniel.rei.gui.entries.SimpleRecipeEntry;
import me.shedaniel.rei.gui.widget.Widget;
-import me.shedaniel.rei.impl.widgets.PanelWidget;
-import net.minecraft.client.gui.DrawableHelper;
import net.minecraft.util.Identifier;
import org.jetbrains.annotations.ApiStatus;
import java.util.Collections;
import java.util.List;
-import java.util.function.Supplier;
public interface RecipeCategory<T extends RecipeDisplay> {
@@ -78,51 +74,13 @@ public interface RecipeCategory<T extends RecipeDisplay> {
/**
* Setup the widgets for displaying the recipe
*
- * @param recipeDisplaySupplier the supplier for getting the recipe
- * @param bounds the bounds of the display, configurable with overriding the width, height methods.
- * @return the list of widgets
- * @deprecated use {@link #setupDisplay(RecipeDisplay, me.shedaniel.math.Rectangle)}
- */
- @ApiStatus.OverrideOnly
- @ApiStatus.ScheduledForRemoval
- @Deprecated
- default List<Widget> setupDisplay(Supplier<T> recipeDisplaySupplier, me.shedaniel.math.api.Rectangle bounds) {
- return Collections.singletonList(Widgets.createCategoryBase(bounds));
- }
-
- /**
- * Setup the widgets for displaying the recipe
- *
* @param recipeDisplay the recipe
* @param bounds the bounds of the display, configurable with overriding the width, height methods.
* @return the list of widgets
*/
@ApiStatus.OverrideOnly
default List<Widget> setupDisplay(T recipeDisplay, Rectangle bounds) {
- return setupDisplay(() -> recipeDisplay, new me.shedaniel.math.api.Rectangle(bounds));
- }
-
- /**
- * Draws the category background, used in {@link RecipeViewingScreen}
- *
- * @param bounds the bounds of the whole recipe viewing screen
- * @param mouseX the x coordinates for the mouse
- * @param mouseY the y coordinates for the mouse
- * @param delta the delta
- * @deprecated there is no replacement for this as this is just a dumb idea, please contact me if you want to change my mind
- */
- @ApiStatus.OverrideOnly
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default void drawCategoryBackground(me.shedaniel.math.api.Rectangle bounds, int mouseX, int mouseY, float delta) {
- PanelWidget.render(bounds, -1);
- if (REIHelper.getInstance().isDarkThemeEnabled()) {
- DrawableHelper.fill(bound