aboutsummaryrefslogtreecommitdiff
path: root/RoughlyEnoughItems-api/src/main/java/me
diff options
context:
space:
mode:
Diffstat (limited to 'RoughlyEnoughItems-api/src/main/java/me')
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/AutoTransferHandler.java27
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/ClientHelper.java80
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/ConfigObject.java31
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/DisplayHelper.java126
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/EntryRegistry.java33
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/EntryStack.java55
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/REIHelper.java14
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/REIPluginEntry.java14
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java17
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeHelper.java42
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/TextTest.java39
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/fluid/FluidSupportProvider.java59
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/subsets/SubsetsRegistry.java34
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/widgets/Label.java9
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/widgets/Panel.java24
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/gui/entries/SimpleRecipeEntry.java13
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/server/ContainerInfoHandler.java10
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/utils/CollectionUtils.java5
18 files changed, 8 insertions, 624 deletions
diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/AutoTransferHandler.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/AutoTransferHandler.java
index f6b9232e7..743538410 100644
--- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/AutoTransferHandler.java
+++ b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/AutoTransferHandler.java
@@ -59,17 +59,6 @@ public interface AutoTransferHandler {
}
/**
- * Creates a successful result, no further handlers will be called.
- * Will return to the previous screen rather than staying open.
- *
- * @deprecated use {@link #blocksFurtherHandling(boolean)}
- */
- @Deprecated
- static Result createSuccessfulReturningToScreen() {
- return createSuccessful().blocksFurtherHandling(true);
- }
-
- /**
* Creates a passing result, further handlers will be called.
* This will also mark the handler as not applicable.
*/
@@ -185,23 +174,9 @@ public interface AutoTransferHandler {
@Nullable
AbstractContainerScreen<?> getContainerScreen();
-
- @Nullable
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default AbstractContainerScreen<?> getHandledScreen() {
- return getContainerScreen();
- }
RecipeDisplay getRecipe();
-
- @Nullable
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default AbstractContainerMenu getScreenHandler() {
- return getContainer();
- }
-
+
@Nullable
default AbstractContainerMenu getContainer() {
return getContainerScreen() == null ? null : getContainerScreen().getMenu();
diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/ClientHelper.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/ClientHelper.java
index 797e44ecb..ddb17e63f 100644
--- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/ClientHelper.java
+++ b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/ClientHelper.java
@@ -37,7 +37,6 @@ import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
-import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -71,22 +70,6 @@ public interface ClientHelper {
*/
void setCheating(boolean cheating);
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- List<ItemStack> getInventoryItemsTypes();
-
- /**
- * Opens a recipe viewing screen:
- * Opens {@link me.shedaniel.rei.gui.PreRecipeViewingScreen} if not set
- * Opens {@link me.shedaniel.rei.gui.RecipeViewingScreen} if set to default
- * Opens {@link me.shedaniel.rei.gui.VillagerRecipeViewingScreen} if set to villager
- *
- * @param map the map of recipes
- */
- @ApiStatus.ScheduledForRemoval
- @Deprecated
- void openRecipeViewingScreen(Map<RecipeCategory<?>, List<RecipeDisplay>> map);
-
/**
* Tries to cheat stack using either packets or commands.
*
@@ -100,42 +83,6 @@ public interface ClientHelper {
}
/**
- * Finds recipe for the stack and opens the recipe screen.
- *
- * @param stack the stack to find recipe for
- * @return whether the stack has any recipes to show
- */
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default boolean executeRecipeKeyBind(EntryStack stack) {
- return openView(ViewSearchBuilder.builder().addRecipesFor(stack).setOutputNotice(stack).fillPreferredOpenedCategory());
- }
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default boolean executeRecipeKeyBind(ItemStack stack) {
- return executeRecipeKeyBind(EntryStack.create(stack));
- }
-
- /**
- * Finds usage for the stack and opens the recipe screen.
- *
- * @param stack the stack to find usage for
- * @return whether the stack has any usages to show
- */
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default boolean executeUsageKeyBind(EntryStack stack) {
- return openView(ViewSearchBuilder.builder().addUsagesFor(stack).setInputNotice(stack).fillPreferredOpenedCategory());
- }
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default boolean executeUsageKeyBind(ItemStack stack) {
- return executeUsageKeyBind(EntryStack.create(stack));
- }
-
- /**
* Gets the mod from an item
*
* @param item the item to find
@@ -219,33 +166,10 @@ public interface ClientHelper {
/**
* Gets the mod from a modid
*
- * @param modid the modid of the mod
+ * @param modId the modid of the mod
* @return the mod name
*/
- String getModFromModId(String modid);
-
- /**
- * Finds all recipes and open them in a recipe screen.
- *
- * @return whether there are any recipes to show
- */
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default boolean executeViewAllRecipesKeyBind() {
- return openView(ViewSearchBuilder.builder().addAllCategories().fillPreferredOpenedCategory());
- }
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default boolean executeViewAllRecipesFromCategory(ResourceLocation category) {
- return openView(ViewSearchBuilder.builder().addCategory(category).fillPreferredOpenedCategory());
- }
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default boolean executeViewAllRecipesFromCategories(List<ResourceLocation> categories) {
- return openView(ViewSearchBuilder.builder().addCategories(categories).fillPreferredOpenedCategory());
- }
+ String getModFromModId(String modId);
boolean openView(ViewSearchBuilder builder);
diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/ConfigObject.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/ConfigObject.java
index 8bce78e5b..d193b1bc4 100644
--- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/ConfigObject.java
+++ b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/ConfigObject.java
@@ -30,7 +30,6 @@ import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import org.jetbrains.annotations.ApiStatus;
-import java.util.Collections;
import java.util.List;
@Environment(EnvType.CLIENT)
@@ -63,10 +62,6 @@ public interface ConfigObject {
boolean isToastDisplayedOnCopyIdentifier();
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- boolean doesRenderEntryEnchantmentGlint();
-
boolean isEntryListWidgetScrolled();
boolean shouldAppendModNames();
@@ -75,10 +70,6 @@ public interface ConfigObject {
void setRecipeScreenType(RecipeScreenType recipeScreenType);
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- boolean isLoadingDefaultPlugin();
-
SearchFieldLocation getSearchFieldLocation();
default boolean isLeftHandSidePanel() {
@@ -117,22 +108,10 @@ public interface ConfigObject {
boolean doDisplayFavoritesTooltip();
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default boolean doDisplayFavoritesOnTheLeft() {
- return true;
- }
-
boolean doesFastEntryRendering();
boolean doDebugRenderTimeRequired();
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default boolean doSearchFavorites() {
- return false;
- }
-
ModifierKeyCode getFavoriteKeyCode();
ModifierKeyCode getRecipeKeybind();
@@ -157,12 +136,6 @@ public interface ConfigObject {
boolean isLowerConfigButton();
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default List<EntryStack> getFavorites() {
- return Collections.emptyList();
- }
-
@ApiStatus.Experimental
List<FavoriteEntry> getFavoriteEntries();
@@ -181,10 +154,6 @@ public interface ConfigObject {
boolean isInventoryHighlightingAllowed();
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- boolean shouldResizeDynamically();
-
@ApiStatus.Experimental
double getHorizontalEntriesBoundaries();
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();
- }
-
}
diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/EntryRegistry.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/EntryRegistry.java
index 7d32ccf40..369862794 100644
--- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/EntryRegistry.java
+++ b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/EntryRegistry.java
@@ -36,7 +36,6 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.function.Predicate;
-import java.util.stream.Collectors;
import java.util.stream.Stream;
@Environment(EnvType.CLIENT)
@@ -50,18 +49,6 @@ public interface EntryRegistry {
return Internals.getEntryRegistry();
}
- /**
- * Gets the current modifiable stacks list
- *
- * @return a stacks list
- */
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- @NotNull
- default List<EntryStack> getStacksList() {
- return getEntryStacks().collect(Collectors.toList());
- }
-
@NotNull
Stream<EntryStack> getEntryStacks();
@@ -96,26 +83,6 @@ public interface EntryRegistry {
void registerEntryAfter(@Nullable EntryStack afterEntry, @NotNull EntryStack stack);
/**
- * Registers an new stack to the entry list
- *
- * @param afterEntry the stack to put after
- * @param stack the stack to register
- * @param checkAlreadyContains whether the list should check if it is already on the list
- * @see #queueRegisterEntryAfter(EntryStack, Collection) for a faster method
- */
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default void registerEntryAfter(@Nullable EntryStack afterEntry, @NotNull EntryStack stack, boolean checkAlreadyContains) {
- registerEntryAfter(afterEntry, stack);
- }
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default void queueRegisterEntryAfter(@Nullable EntryStack afterEntry, @NotNull Collection<@NotNull ? extends EntryStack> stacks) {
- registerEntriesAfter(afterEntry, stacks);
- }
-
- /**
* Registers multiple stacks to the item list
*
* @param afterStack the stack to put after
diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/EntryStack.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/EntryStack.java
index 70c8a06bc..fb117d3b8 100644
--- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/EntryStack.java
+++ b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/EntryStack.java
@@ -146,24 +146,6 @@ public interface EntryStack extends TextRepresentable {
return ImmutableList.copyOf(result);
}
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- static List<EntryStack> create(Collection<ItemStack> stacks) {
- return ofItemStacks(stacks);
- }
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- static List<EntryStack> create(Ingredient ingredient) {
- return ofIngredient(ingredient);
- }
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- static List<List<EntryStack>> create(List<Ingredient> ingredients) {
- return ofIngredients(ingredients);
- }
-
@ApiStatus.Internal
static EntryStack readFromJson(JsonElement jsonElement) {
try {
@@ -216,34 +198,6 @@ public interface EntryStack extends TextRepresentable {
}
}
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- static EntryStack copyFluidToBucket(EntryStack stack) {
- return copyFluidToItem(stack);
- }
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- static EntryStack copyFluidToItem(EntryStack stack) {
- Item bucketItem = stack.getFluid().getBucket();
- if (bucketItem != null) {
- return EntryStack.create(bucketItem);
- }
- return EntryStack.empty();
- }
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- static EntryStack copyBucketToFluid(EntryStack stack) {
- return copyItemToFluid(stack);
- }
-
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- static EntryStack copyItemToFluid(EntryStack stack) {
- return FluidSupportProvider.getInstance().itemToFluid(stack);
- }
-
static Stream<EntryStack> copyItemToFluids(EntryStack stack) {
return FluidSupportProvider.getInstance().itemToFluids(stack);
}
@@ -409,15 +363,6 @@ public interface EntryStack extends TextRepresentable {
return id;
}
- public static class Item {
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- public static final Settings<Supplier<Boolean>> RENDER_ENCHANTMENT_GLINT = new Settings<>(TRUE);
-
- private Item() {
- }
- }
-
public static class Fluid {
// Return null to disable
public static final Settings<Function<EntryStack, String>> AMOUNT_TOOLTIP = new Settings<>(stack -> I18n.get("tooltip.rei.fluid_amount", stack.simplifyAmount().getAccurateAmount()));
diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/REIHelper.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/REIHelper.java
index 787c83e19..c4bc5b429 100644
--- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/REIHelper.java
+++ b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/REIHelper.java
@@ -30,12 +30,10 @@ import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.resources.ResourceLocation;
-import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import java.util.List;
import java.util.Optional;
@Environment(EnvType.CLIENT)
@@ -54,23 +52,11 @@ public interface REIHelper {
@Nullable
AbstractContainerScreen<?> getPreviousContainerScreen();
- @Nullable
- @Deprecated
- default AbstractContainerScreen<?> getPreviousHandledScreen() {
- return getPreviousContainerScreen();
- }
-
boolean isDarkThemeEnabled();
@Nullable
TextFieldWidget getSearchTextField();
- @NotNull
- @ApiStatus.Internal
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- List<ItemStack> getInventoryStacks();
-
void queueTooltip(@Nullable Tooltip tooltip);
@NotNull
diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/REIPluginEntry.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/REIPluginEntry.java
index 6bf43e5a5..3285898f2 100644
--- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/REIPluginEntry.java
+++ b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/REIPluginEntry.java
@@ -23,26 +23,12 @@
package me.shedaniel.rei.api;
-import net.fabricmc.loader.api.SemanticVersion;
-import net.fabricmc.loader.util.version.VersionParsingException;
import net.minecraft.resources.ResourceLocation;
-import org.jetbrains.annotations.ApiStatus;
/**
* Get base class of a REI plugin.
*/
public interface REIPluginEntry {
-
- /**
- * @return the minimum version for the REI plugin to load
- * @deprecated deprecated due to the lack of need of this method, please declare conflicts with fabric.mod.json
- */
- @ApiStatus.ScheduledForRemoval
- @Deprecated
- default SemanticVersion getMinimumVersion() throws VersionParsingException {
- return null;
- }
-
/**
* @return the priority of the plugin, the smaller the number, the earlier it is called.
*/
diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java
index ff6722e74..c99eb50a3 100644
--- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java
+++ b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java
@@ -23,9 +23,7 @@
package me.shedaniel.rei.api;
-import me.shedaniel.rei.utils.CollectionUtils;
import net.minecraft.resources.ResourceLocation;
-import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import java.util.Collections;
@@ -42,22 +40,9 @@ public interface RecipeDisplay {
/**
* @return a list of outputs
- * @deprecated Use {@link RecipeDisplay#getResultingEntries()}
*/
- @Deprecated
- @ApiStatus.ScheduledForRemoval(inVersion = "1.17")
@NotNull
- default List<EntryStack> getOutputEntries() {
- return Collections.emptyList();
- }
-
- /**
- * @return a list of outputs
- */
- @NotNull
- default List<List<EntryStack>> getResultingEntries() {
- return CollectionUtils.map(getOutputEntries(), Collections::singletonList);
- }
+ List<List<EntryStack>> getResultingEntries();
/**
* Gets the required items used in craftable filters
diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeHelper.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeHelper.java
index 205608e14..b0c61e380 100644
--- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeHelper.java
+++ b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeHelper.java
@@ -36,7 +36,6 @@ import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@@ -138,19 +137,6 @@ public interface RecipeHelper {
*/
void registerDisplay(RecipeDisplay display);
- /**
- * Registers a recipe display.
- *
- * @param categoryIdentifier the category to display in
- * @param display the recipe display
- * @deprecated Use {@link RecipeHelper#registerDisplay(RecipeDisplay)}
- */
- @ApiStatus.ScheduledForRemoval
- @Deprecated
- default void registerDisplay(ResourceLocation categoryIdentifier, RecipeDisplay display) {
- registerDisplay(display);
- }
-
Map<RecipeCategory<?>, List<RecipeDisplay>> buildMapFor(ClientHelper.ViewSearchBuilder builder);
/**
@@ -263,15 +249,6 @@ public interface RecipeHelper {
void registerLiveRecipeGenerator(LiveRecipeGenerator<?> liveRecipeGenerator);
/**
- * @deprecated Use {@link #registerContainerClickArea(Rectangle, Class, ResourceLocation...)} for the same result.
- */
- @Deprecated
- @ApiStatus.ScheduledForRemoval
- default void registerScreenClickArea(Rectangle rectangle, Class<? extends AbstractContainerScreen<?>> screenClass, ResourceLocation... categories) {
- registerContainerClickArea(rectangle, screenClass, categories);
- }
-
- /**
* Registers a click area for a container screen.
*
* @param rectangle The click area that is offset to the container screen's top left corner.
@@ -318,25 +295,6 @@ public interface RecipeHelper {
<T extends Recipe<?>> void registerRecipes(ResourceLocation category, Function<Recipe, Boolean> recipeFilter, Function<T, RecipeDisplay> mappingFunction);
@ApiStatus.Internal
- @Deprecated
- @ApiStatus.ScheduledForRemoval(inVersion = "6.0")
- default List<RecipeHelper.ScreenClickArea> getScreenClickAreas() {
- return Collections.emptyList();
- }
-
- @ApiStatus.Internal
boolean arePluginsLoading();
-
- @ApiStatus.Internal
- @Deprecated
- @ApiStatus.ScheduledForRemoval(inVersion = "6.0")
- interface ScreenClickArea {
- Class<? extends Screen> getScreenClass();
-
- Rectangle getRectangle();
-
- ResourceLocation[] getCategories();
- }
-
}
diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/TextTest.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/TextTest.java
deleted file mode 100644
index b4c7554ef..000000000
--- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/TextTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * This file is licensed under the MIT License, part of Roughly Enough Items.
- * Copyright (c) 2018, 2019, 2020 shedaniel
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package me.shedaniel.rei.api;
-
-import net.minecraft.ChatFormatting;
-import net.minecraft.network.chat.MutableComponent;
-import net.minecraft.network.chat.TextComponent;
-import org.jetbrains.annotations.ApiStatus;
-