aboutsummaryrefslogtreecommitdiff
path: root/api/src
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2022-08-26 16:48:42 +0900
committershedaniel <daniel@shedaniel.me>2022-08-26 21:17:48 +0900
commita6900532610247cae49f1c782442d07d8f7b1d2d (patch)
tree5b01e2e8a84f5fc5254b9613b15ec1ef84961133 /api/src
parentd3bfd79800aacfde6617d5430ead5fdda0a506fe (diff)
downloadRoughlyEnoughItems-a6900532610247cae49f1c782442d07d8f7b1d2d.tar.gz
RoughlyEnoughItems-a6900532610247cae49f1c782442d07d8f7b1d2d.tar.bz2
RoughlyEnoughItems-a6900532610247cae49f1c782442d07d8f7b1d2d.zip
It compiles now
Diffstat (limited to 'api/src')
-rw-r--r--api/src/main/java/me/shedaniel/rei/api/client/gui/SimpleDisplayRenderer.java14
-rw-r--r--api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Slot.java94
-rw-r--r--api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/TextField.java4
-rw-r--r--api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Tooltip.java20
-rw-r--r--api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/TooltipContext.java2
-rw-r--r--api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Widgets.java6
-rw-r--r--api/src/main/java/me/shedaniel/rei/api/client/registry/display/DisplayCategoryView.java2
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/client/ClientInternals.java16
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/client/provider/AutoCraftingEvaluator.java103
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/client/provider/DelegatingFavoriteEntryProvider.java3
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/client/provider/FavoritesEntriesListProvider.java2
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/client/provider/MissingStacksTooltipProvider.java2
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/client/provider/OverlayTicker.java31
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/client/provider/WidgetsProvider.java2
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/common/provider/CategoryIdentifierConstructor.java2
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/common/provider/DeferringEntryTypeProvider.java2
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/common/provider/EntryIngredientProvider.java2
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/common/provider/EntryStackProvider.java2
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/common/provider/NbtHasherProvider.java2
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/common/provider/PluginManagerConstructor.java2
20 files changed, 289 insertions, 24 deletions
diff --git a/api/src/main/java/me/shedaniel/rei/api/client/gui/SimpleDisplayRenderer.java b/api/src/main/java/me/shedaniel/rei/api/client/gui/SimpleDisplayRenderer.java
index 92646aa0d..2270a8ab9 100644
--- a/api/src/main/java/me/shedaniel/rei/api/client/gui/SimpleDisplayRenderer.java
+++ b/api/src/main/java/me/shedaniel/rei/api/client/gui/SimpleDisplayRenderer.java
@@ -66,9 +66,9 @@ public class SimpleDisplayRenderer extends DisplayRenderer implements WidgetHold
protected Slot createSlot(EntryIngredient ingredient) {
return Widgets.createSlot(new Point(0, 0))
.entries(CollectionUtils.filterToList(ingredient, stack -> !stack.isEmpty()))
- .disableBackground()
- .disableHighlight()
- .disableTooltips();
+ .noBackground()
+ .noHighlight()
+ .noTooltips();
}
public static List<EntryIngredient> simplify(List<EntryIngredient> original) {
@@ -123,10 +123,10 @@ public class SimpleDisplayRenderer extends DisplayRenderer implements WidgetHold
int xx = bounds.x + 4, yy = bounds.y + 2;
int j = 0;
int itemsPerLine = getItemsPerLine();
- for (Slot entryWidget : inputWidgets) {
- entryWidget.setZ(getZ() + 50);
- entryWidget.getBounds().setLocation(xx, yy);
- entryWidget.render(matrices, mouseX, mouseY, delta);
+ for (Slot slot : inputWidgets) {
+ slot.setZ(getZ() + 50);
+ slot.getBounds().setLocation(xx, yy);
+ slot.render(matrices, mouseX, mouseY, delta);
xx += 18;
j++;
if (j >= getItemsPerLine() - 2) {
diff --git a/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Slot.java b/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Slot.java
index 88220ecf2..71fa8f49c 100644
--- a/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Slot.java
+++ b/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Slot.java
@@ -26,17 +26,22 @@ package me.shedaniel.rei.api.client.gui.widgets;
import com.mojang.blaze3d.vertex.PoseStack;
import me.shedaniel.math.Point;
import me.shedaniel.math.Rectangle;
+import me.shedaniel.rei.api.client.entry.renderer.EntryRenderer;
+import me.shedaniel.rei.api.client.favorites.FavoriteEntry;
import me.shedaniel.rei.api.common.entry.EntryStack;
+import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;
import java.util.Collection;
import java.util.List;
-import java.util.function.UnaryOperator;
+import java.util.function.*;
public abstract class Slot extends WidgetWithBounds {
public static final byte UN_MARKED = 0;
public static final byte INPUT = 1;
public static final byte OUTPUT = 2;
+ @ApiStatus.Experimental
+ public static final byte FAVORITE = 4;
public final Slot unmarkInputOrOutput() {
setNoticeMark(UN_MARKED);
@@ -53,6 +58,14 @@ public abstract class Slot extends WidgetWithBounds {
return this;
}
+ public final void size(float size) {
+ this.getBounds().setSize(size, size);
+ }
+
+ public final void size(float width, float height) {
+ this.getBounds().setSize(width, height);
+ }
+
public abstract void setNoticeMark(byte mark);
public abstract byte getNoticeMark();
@@ -70,6 +83,7 @@ public abstract class Slot extends WidgetWithBounds {
return interactable(false);
}
+ @Deprecated(forRemoval = true)
public final Slot notInteractable() {
return interactable(false);
}
@@ -87,11 +101,16 @@ public abstract class Slot extends WidgetWithBounds {
return interactableFavorites(false);
}
+ @Deprecated(forRemoval = true)
public final Slot notFavoritesInteractable() {
return interactableFavorites(false);
}
- public abstract void setHighlightEnabled(boolean highlights);
+ public final void setHighlightEnabled(boolean highlights) {
+ setHighlightEnabled(slot -> highlights);
+ }
+
+ public abstract void setHighlightEnabled(Predicate<Slot> highlights);
public abstract boolean isHighlightEnabled();
@@ -100,11 +119,27 @@ public abstract class Slot extends WidgetWithBounds {
return this;
}
+ public abstract Slot highlightEnabled(Predicate<Slot> highlight);
+
+ public final Slot noHighlight() {
+ return highlightEnabled(false);
+ }
+
+ public final Slot noHighlightIfEmpty() {
+ setHighlightEnabled(slot -> !slot.isEmpty());
+ return this;
+ }
+
+ @Deprecated(forRemoval = true)
public final Slot disableHighlight() {
return highlightEnabled(false);
}
- public abstract void setTooltipsEnabled(boolean tooltipsEnabled);
+ public void setTooltipsEnabled(boolean tooltipsEnabled) {
+ setTooltipsEnabled(slot -> tooltipsEnabled);
+ }
+
+ public abstract void setTooltipsEnabled(Predicate<Slot> tooltipsEnabled);
public abstract boolean isTooltipsEnabled();
@@ -113,11 +148,22 @@ public abstract class Slot extends WidgetWithBounds {
return this;
}
+ public abstract Slot tooltipsEnabled(Predicate<Slot> tooltipsEnabled);
+
+ public final Slot noTooltips() {
+ return tooltipsEnabled(false);
+ }
+
+ @Deprecated(forRemoval = true)
public final Slot disableTooltips() {
return tooltipsEnabled(false);
}
- public abstract void setBackgroundEnabled(boolean backgroundEnabled);
+ public void setBackgroundEnabled(boolean backgroundEnabled) {
+ setBackgroundEnabled(slot -> backgroundEnabled);
+ }
+
+ public abstract void setBackgroundEnabled(Predicate<Slot> backgroundEnabled);
public abstract boolean isBackgroundEnabled();
@@ -126,10 +172,26 @@ public abstract class Slot extends WidgetWithBounds {
return this;
}
+ public abstract Slot backgroundEnabled(Predicate<Slot> backgroundEnabled);
+
+ public final Slot noBackground() {
+ return backgroundEnabled(false);
+ }
+
+ @Deprecated(forRemoval = true)
public final Slot disableBackground() {
return backgroundEnabled(false);
}
+ public abstract void setCyclingInterval(long cyclingInterval);
+
+ public abstract long getCyclingInterval();
+
+ public final Slot cyclingInterval(long cyclingInterval) {
+ setCyclingInterval(cyclingInterval);
+ return this;
+ }
+
public abstract Slot clearEntries();
public abstract Slot entry(EntryStack<?> stack);
@@ -140,6 +202,10 @@ public abstract class Slot extends WidgetWithBounds {
public abstract List<EntryStack<?>> getEntries();
+ public final boolean isEmpty() {
+ return getEntries().isEmpty();
+ }
+
public abstract Rectangle getInnerBounds();
public abstract void drawBackground(PoseStack matrices, int mouseX, int mouseY, float delta);
@@ -160,4 +226,24 @@ public abstract class Slot extends WidgetWithBounds {
public abstract void drawHighlighted(PoseStack matrices, int mouseX, int mouseY, float delta);
public abstract void tooltipProcessor(UnaryOperator<Tooltip> operator);
+
+ public abstract void action(ActionPredicate predicate);
+
+ @ApiStatus.Experimental
+ public abstract void setFavoriteEntryFunction(Function<EntryStack<?>, FavoriteEntry> function);
+
+ @ApiStatus.Experimental
+ public abstract Function<EntryStack<?>, FavoriteEntry> getFavoriteEntryFunction();
+
+ @ApiStatus.Experimental
+ public abstract void setContainsPointFunction(BiPredicate<Slot, Point> function);
+
+ @ApiStatus.Experimental
+ public abstract void appendContainsPointFunction(BiPredicate<Slot, Point> function);
+
+ public interface ActionPredicate {
+ boolean doMouse(Slot slot, double mouseX, double mouseY, int button);
+
+ boolean doKey(Slot slot, int keyCode, int scanCode, int modifiers);
+ }
}
diff --git a/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/TextField.java b/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/TextField.java
index 803502972..1757e77b5 100644
--- a/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/TextField.java
+++ b/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/TextField.java
@@ -38,8 +38,12 @@ import static me.shedaniel.rei.api.client.gui.widgets.Widget.mouse;
public interface TextField extends TickableWidget {
void setFormatter(TextFormatter formatter);
+ TextFormatter getFormatter();
+
void setSuggestionRenderer(SuggestionRenderer renderer);
+ SuggestionRenderer getSuggestionRenderer();
+
String getText();
void setText(String text);
diff --git a/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Tooltip.java b/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Tooltip.java
index 550c9b226..848e853de 100644
--- a/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Tooltip.java
+++ b/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Tooltip.java
@@ -66,8 +66,16 @@ public interface Tooltip {
return create(point, Arrays.asList(texts));
}
+ static Tooltip create(@Nullable TooltipContext context, Collection<Component> texts) {
+ return from(context, CollectionUtils.map(texts, Tooltip::entry));
+ }
+
+ static Tooltip create(@Nullable TooltipContext context, Component... texts) {
+ return create(context, Arrays.asList(texts));
+ }
+
static Tooltip create(Collection<Component> texts) {
- return create(null, texts);
+ return create((TooltipContext) null, texts);
}
static Tooltip create(Component... texts) {
@@ -82,8 +90,16 @@ public interface Tooltip {
return from(point, Arrays.asList(entries));
}
+ static Tooltip from(@Nullable TooltipContext context, Collection<Entry> entries) {
+ return ClientInternals.createTooltip(context == null ? null : context.getPoint(), entries);
+ }
+
+ static Tooltip from(@Nullable TooltipContext context, Entry... entries) {
+ return from(context, Arrays.asList(entries));
+ }
+
static Tooltip from(Collection<Entry> entries) {
- return from(null, entries);
+ return from((TooltipContext) null, entries);
}
static Tooltip from(Entry... entries) {
diff --git a/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/TooltipContext.java b/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/TooltipContext.java
index cb20f2bd2..b2cabe322 100644
--- a/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/TooltipContext.java
+++ b/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/TooltipContext.java
@@ -52,7 +52,7 @@ public interface TooltipContext {
}
static TooltipContext ofMouse() {
- return TooltipContext.of(PointHelper.ofMouse());
+ return TooltipContext.of(Widget.mouse());
}
TooltipFlag getFlag();
diff --git a/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Widgets.java b/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Widgets.java
index 4e7e2d336..67dfe7cbb 100644
--- a/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Widgets.java
+++ b/api/src/main/java/me/shedaniel/rei/api/client/gui/widgets/Widgets.java
@@ -260,11 +260,7 @@ public final class Widgets {
public static Panel createSlotBase(Rectangle rectangle) {
- return ClientInternals.getWidgetsProvider().createPanelWidget(rectangle).yTextureOffset(-66).rendering(Widgets::shouldSlotBaseRender);
- }
-
- private static boolean shouldSlotBaseRender(Panel panel) {
- return true;
+ return ClientInternals.getWidgetsProvider().createPanelWidget(rectangle).yTextureOffset(-66);
}
public static Panel createSlotBase(Rectangle rectangle, int color) {
diff --git a/api/src/main/java/me/shedaniel/rei/api/client/registry/display/DisplayCategoryView.java b/api/src/main/java/me/shedaniel/rei/api/client/registry/display/DisplayCategoryView.java
index 47f3b9803..e78ac4ff4 100644
--- a/api/src/main/java/me/shedaniel/rei/api/client/registry/display/DisplayCategoryView.java
+++ b/api/src/main/java/me/shedaniel/rei/api/client/registry/display/DisplayCategoryView.java
@@ -66,7 +66,7 @@ public interface DisplayCategoryView<T extends Display> {
* for how the tooltip is resolved.
* <p>
* It is recommended to mark these slots for I/O using {@link Slot#markInput()} and {@link Slot#markOutput()},
- * and the background of the slots may be disabled using {@link Slot#disableBackground()}.
+ * and the background of the slots may be disabled using {@link Slot#noBackground()}.
* <p>
* Arbitrary text may be added to the widgets list with {@link Widgets#createLabel(Point, Component)},
* you may configure the horizontal alignment of the text using {@link Label#centered()},
diff --git a/api/src/main/java/me/shedaniel/rei/impl/client/ClientInternals.java b/api/src/main/java/me/shedaniel/rei/impl/client/ClientInternals.java
index b684d3554..706ea27ad 100644
--- a/api/src/main/java/me/shedaniel/rei/impl/client/ClientInternals.java
+++ b/api/src/main/java/me/shedaniel/rei/impl/client/ClientInternals.java
@@ -33,12 +33,10 @@ import me.shedaniel.rei.api.client.plugins.REIClientPlugin;
import me.shedaniel.rei.api.client.registry.entry.PreFilteredEntryList;
import me.shedaniel.rei.api.client.registry.screen.ClickArea;
import me.shedaniel.rei.api.client.view.ViewSearchBuilder;
+import me.shedaniel.rei.api.common.display.Display;
import me.shedaniel.rei.api.common.entry.EntryIngredient;
import me.shedaniel.rei.api.common.plugins.PluginManager;
-import me.shedaniel.rei.impl.client.provider.DelegatingFavoriteEntryProvider;
-import me.shedaniel.rei.impl.client.provider.FavoritesEntriesListProvider;
-import me.shedaniel.rei.impl.client.provider.MissingStacksTooltipProvider;
-import me.shedaniel.rei.impl.client.provider.WidgetsProvider;
+import me.shedaniel.rei.impl.client.provider.*;
import me.shedaniel.rei.impl.common.Internals;
import net.minecraft.ReportedException;
import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent;
@@ -64,6 +62,8 @@ public final class ClientInternals {
UnaryOperator.identity());
private static final DelegatingFavoriteEntryProvider DELEGATE_FAVORITE_ENTRY = resolveService(DelegatingFavoriteEntryProvider.class);
private static final FavoritesEntriesListProvider FAVORITES_ENTRIES_LIST = resolveService(FavoritesEntriesListProvider.class);
+ private static final List<OverlayTicker> OVERLAY_TICKERS = resolveServices(OverlayTicker.class);
+ private static final AutoCraftingEvaluator AUTO_CRAFTING_EVALUATOR = resolveService(AutoCraftingEvaluator.class);
private static Function<CompoundTag, DataResult<FavoriteEntry>> favoriteEntryFromJson = (object) -> throwNotSetup();
private static Function<Boolean, ClickArea.Result> clickAreaHandlerResult = (result) -> throwNotSetup();
private static BiConsumer<List<ClientTooltipComponent>, TooltipComponent> clientTooltipComponentProvider = (tooltip, result) -> throwNotSetup();
@@ -157,6 +157,14 @@ public final class ClientInternals {
return FAVORITES_ENTRIES_LIST.get();
}
+ public static List<OverlayTicker> getOverlayTickers() {
+ return OVERLAY_TICKERS;
+ }
+
+ public static AutoCraftingEvaluator.Builder getAutoCraftingEvaluator(Display display) {
+ return AUTO_CRAFTING_EVALUATOR.builder(display);
+ }
+
public static DataResult<FavoriteEntry> favoriteEntryFromJson(CompoundTag tag) {
return favoriteEntryFromJson.apply(tag);
}
diff --git a/api/src/main/java/me/shedaniel/rei/impl/client/provider/AutoCraftingEvaluator.java b/api/src/main/java/me/shedaniel/rei/impl/client/provider/AutoCraftingEvaluator.java
new file mode 100644
index 000000000..413c13d8c
--- /dev/null
+++ b/api/src/main/java/me/shedaniel/rei/impl/client/provider/AutoCraftingEvaluator.java
@@ -0,0 +1,103 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021, 2022 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.impl.client.provider;
+
+import me.shedaniel.math.Point;
+import me.shedaniel.rei.api.client.gui.widgets.Tooltip;
+import me.shedaniel.rei.api.client.registry.transfer.TransferHandler;
+import me.shedaniel.rei.api.client.registry.transfer.TransferHandlerRenderer;
+import me.shedaniel.rei.api.common.display.Display;
+import net.minecraft.resources.ResourceLocation;
+import org.jetbrains.annotations.Nullable;
+
+import java.util.Collection;
+import java.util.function.BiConsumer;
+import java.util.function.Consumer;
+
+public interface AutoCraftingEvaluator {
+ Builder builder(Display display);
+
+ interface Builder {
+ Builder actuallyCraft();
+
+ default Builder actuallyCraft(boolean build) {
+ if (build) {
+ return actuallyCraft();
+ } else {
+ return this;
+ }
+ }
+
+ Builder stacked();
+
+ default Builder stacked(boolean build) {
+ if (build) {
+ return stacked();
+ } else {
+ return this;
+ }
+ }
+
+ Builder ids(@Nullable Collection<ResourceLocation> ids);
+
+ Builder buildRenderer();
+
+ default Builder buildRenderer(boolean build) {
+ if (build) {
+ return buildRenderer();
+ } else {
+ return this;
+ }
+ }
+
+ Builder buildTooltipRenderer();
+
+ default Builder buildTooltipRenderer(boolean build) {
+ if (build) {
+ return buildTooltipRenderer();
+ } else {
+ return this;
+ }
+ }
+
+ Result get();
+ }
+
+ interface Result {
+ int getTint();
+
+ boolean isSuccessful();
+
+ @Nullable
+ TransferHandler getSuccessfulHandler();
+
+ boolean isApplicable();
+
+ @Nullable
+ TransferHandlerRenderer getRenderer();
+
+ @Nullable
+ BiConsumer<Point, Consumer<Tooltip>> getTooltipRenderer();
+ }
+}
diff --git a/api/src/main/java/me/shedaniel/rei/impl/client/provider/DelegatingFavoriteEntryProvider.java b/api/src/main/java/me/shedaniel/rei/impl/client/provider/DelegatingFavoriteEntryProvider.java
index 2eec919f8..48a773dca 100644
--- a/api/src/main/java/me/shedaniel/rei/impl/client/provider/DelegatingFavoriteEntryProvider.java
+++ b/api/src/main/java/me/shedaniel/rei/impl/client/provider/DelegatingFavoriteEntryProvider.java
@@ -26,9 +26,12 @@ package me.shedaniel.rei.impl.client.provider;
import com.mojang.serialization.DataResult;
import me.shedaniel.rei.api.client.favorites.FavoriteEntry;
import net.minecraft.nbt.CompoundTag;
+import org.jetbrains.annotations.ApiStatus;
+import org.spongepowered.asm.mixin.injection.Inject;
import java.util.function.Supplier;
+@ApiStatus.Internal
public interface DelegatingFavoriteEntryProvider {
FavoriteEntry delegate(Supplier<DataResult<FavoriteEntry>> result, Supplier<CompoundTag> tag);
}
diff --git a/api/src/main/java/me/shedaniel/rei/impl/client/provider/FavoritesEntriesListProvider.java b/api/src/main/java/me/shedaniel/rei/impl/client/provider/FavoritesEntriesListProvider.java
index d2c1ec23c..05205b1da 100644
--- a/api/src/main/java/me/shedaniel/rei/impl/client/provider/FavoritesEntriesListProvider.java
+++ b/api/src/main/java/me/shedaniel/rei/impl/client/provider/FavoritesEntriesListProvider.java
@@ -24,9 +24,11 @@
package me.shedaniel.rei.impl.client.provider;
import me.shedaniel.rei.api.client.favorites.FavoriteEntry;
+import org.jetbrains.annotations.ApiStatus;
import java.util.List;
+@ApiStatus.Internal
public interface FavoritesEntriesListProvider {
List<FavoriteEntry> get();
}
diff --git a/api/src/main/java/me/shedaniel/rei/impl/client/provider/MissingStacksTooltipProvider.java b/api/src/main/java/me/shedaniel/rei/impl/client/provider/MissingStacksTooltipProvider.java
index b10675f1f..1d07c370f 100644
--- a/api/src/main/java/me/shedaniel/rei/impl/client/provider/MissingStacksTooltipProvider.java
+++ b/api/src/main/java/me/shedaniel/rei/impl/client/provider/MissingStacksTooltipProvider.java
@@ -25,9 +25,11 @@ package me.shedaniel.rei.impl.client.provider;
import me.shedaniel.rei.api.common.entry.EntryIngredient;
import net.minecraft.world.inventory.tooltip.TooltipComponent;
+import org.jetbrains.annotations.ApiStatus;
import java.util.List;
+@ApiStatus.Internal
public interface MissingStacksTooltipProvider {
TooltipComponent provide(List<EntryIngredient> stacks);
}
diff --git a/api/src/main/java/me/shedaniel/rei/impl/client/provider/OverlayTicker.java b/api/src/main/java/me/shedaniel/rei/impl/client/provider/OverlayTicker.java
new file mode 100644
index 000000000..5f8fd1877
--- /dev/null
+++ b/api/src/main/java/me/shedaniel/rei/impl/client/provider/OverlayTicker.java
@@ -0,0 +1,31 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021, 2022 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.impl.client.provider;
+
+import org.jetbrains.annotations.ApiStatus;
+
+@ApiStatus.Internal
+public interface OverlayTicker {
+ void tick();
+}
diff --git a/api/src/main/java/me/shedaniel/rei/impl/client/provider/WidgetsProvider.java b/api/src/main/java/me/shedaniel/rei/impl/client/provider/WidgetsProvider.java
index 6d985e4a2..28d38c24c 100644
--- a/api/src/main/java/me/shedaniel/rei/impl/client/provider/WidgetsProvider.java
+++ b/api/src/main/java/me/shedaniel/rei/impl/client/provider/WidgetsProvider.java
@@ -33,10 +33,12 @@ import net.minecraft.client.gui.components.events.GuiEventListener;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.FormattedText;
import net.minecraft.resources.ResourceLocation;
+import org.jetbrains.annotations.ApiStatus;
import java.util.List;
import java.util.function.Supplier;
+@ApiStatus.Internal
public interface WidgetsProvider {
boolean isRenderingPanel(Panel panel);
diff --git a/api/src/main/java/me/shedaniel/rei/impl/common/provider/CategoryIdentifierConstructor.java b/api/src/main/java/me/shedaniel/rei/impl/common/provider/CategoryIdentifierConstructor.java
index 11b3b4928..a316f7605 100644
--- a/api/src/main/java/me/shedaniel/rei/impl/common/provider/CategoryIdentifierConstructor.java
+++ b/api/src/main/java/me/shedaniel/rei/impl/common/provider/CategoryIdentifierConstructor.java
@@ -25,7 +25,9 @@ package me.shedaniel.rei.impl.common.provider;
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
import me.shedaniel.rei.api.common.display.Display;
+import org.jetbrains.annotations.ApiStatus;
+@ApiStatus.Internal
public interface CategoryIdentifierConstructor {
<T extends Display> CategoryIdentifier<T> create(String location);
}
diff --git a/api/src/main/java/me/shedaniel/rei/impl/common/provider/DeferringEntryTypeProvider.java b/api/src/main/java/me/shedaniel/rei/impl/common/provider/DeferringEntryTypeProvider.java
index 3abf02a90..eb2240988 100644
--- a/api/src/main/java/me/shedaniel/rei/impl/common/provider/DeferringEntryTypeProvider.java
+++ b/api/src/main/java/me/shedaniel/rei/impl/common/provider/DeferringEntryTypeProvider.java
@@ -25,7 +25,9 @@ package me.shedaniel.rei.impl.common.provider;
import me.shedaniel.rei.api.common.entry.type.EntryType;
import net.minecraft.resources.ResourceLocation;
+import org.jetbrains.annotations.ApiStatus;
+@ApiStatus.Internal
public interface DeferringEntryTypeProvider {
EntryType<?> get(ResourceLocation id);
}
diff --git a/api/src/main/java/me/shedaniel/rei/impl/common/provider/EntryIngredientProvider.java b/api/src/main/java/me/shedaniel/rei/impl/common/provider/EntryIngredientProvider.java
index 2a0ead5ab..5d86576a1 100644
--- a/api/src/main/java/me/shedaniel/rei/impl/common/provider/EntryIngredientProvider.java
+++ b/api/src/main/java/me/shedaniel/rei/impl/common/provider/EntryIngredientProvider.java
@@ -25