aboutsummaryrefslogtreecommitdiff
path: root/api/src/main/java/me/shedaniel/rei/impl
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-03-25 03:55:36 +0800
committershedaniel <daniel@shedaniel.me>2021-03-25 03:55:36 +0800
commit995b8b58aa8c890c9181ae479e12a4facfa05a25 (patch)
treea16149371fc4b69a73e2ab13e2d96cd2c324b43a /api/src/main/java/me/shedaniel/rei/impl
parenta34a748d2b6cdb1f70f176f1ec1bd27cbc2a98cf (diff)
downloadRoughlyEnoughItems-995b8b58aa8c890c9181ae479e12a4facfa05a25.tar.gz
RoughlyEnoughItems-995b8b58aa8c890c9181ae479e12a4facfa05a25.tar.bz2
RoughlyEnoughItems-995b8b58aa8c890c9181ae479e12a4facfa05a25.zip
Relocate most of the internal classes to match the api
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'api/src/main/java/me/shedaniel/rei/impl')
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/ClientInternals.java8
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/Internals.java14
2 files changed, 15 insertions, 7 deletions
diff --git a/api/src/main/java/me/shedaniel/rei/impl/ClientInternals.java b/api/src/main/java/me/shedaniel/rei/impl/ClientInternals.java
index 8195401da..1daaa568d 100644
--- a/api/src/main/java/me/shedaniel/rei/impl/ClientInternals.java
+++ b/api/src/main/java/me/shedaniel/rei/impl/ClientInternals.java
@@ -27,10 +27,10 @@ import com.google.gson.JsonObject;
import me.shedaniel.math.Point;
import me.shedaniel.math.Rectangle;
import me.shedaniel.rei.api.client.ClientHelper;
+import me.shedaniel.rei.api.client.entry.renderer.EntryRenderer;
import me.shedaniel.rei.api.client.favorites.FavoriteEntry;
import me.shedaniel.rei.api.client.gui.DrawableConsumer;
import me.shedaniel.rei.api.client.gui.widgets.*;
-import me.shedaniel.rei.api.client.ingredient.entry.renderer.EntryRenderer;
import me.shedaniel.rei.api.client.plugins.REIClientPlugin;
import me.shedaniel.rei.api.client.registry.screen.ClickArea;
import me.shedaniel.rei.api.client.view.ViewSearchBuilder;
@@ -70,10 +70,14 @@ public final class ClientInternals {
@ApiStatus.Internal
public static <T> void attachInstance(T instance, Class<T> clazz) {
- attachInstance((Supplier<T>) () -> instance, clazz.getSimpleName());
+ attachInstanceSupplier(instance, clazz.getSimpleName());
}
@ApiStatus.Internal
+ public static <T> void attachInstanceSupplier(T instance, String name) {
+ attachInstance((Supplier<T>) () -> instance, name);
+ }
+
public static <T> void attachInstance(T instance, String name) {
try {
for (Field field : ClientInternals.class.getDeclaredFields()) {
diff --git a/api/src/main/java/me/shedaniel/rei/impl/Internals.java b/api/src/main/java/me/shedaniel/rei/impl/Internals.java
index 5ae71b025..afa599934 100644
--- a/api/src/main/java/me/shedaniel/rei/impl/Internals.java
+++ b/api/src/main/java/me/shedaniel/rei/impl/Internals.java
@@ -25,10 +25,10 @@ package me.shedaniel.rei.impl;
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
import me.shedaniel.rei.api.common.display.Display;
-import me.shedaniel.rei.api.common.ingredient.EntryIngredient;
-import me.shedaniel.rei.api.common.ingredient.EntryStack;
-import me.shedaniel.rei.api.common.ingredient.entry.type.EntryDefinition;
-import me.shedaniel.rei.api.common.ingredient.entry.type.EntryType;
+import me.shedaniel.rei.api.common.entry.EntryIngredient;
+import me.shedaniel.rei.api.common.entry.EntryStack;
+import me.shedaniel.rei.api.common.entry.type.EntryDefinition;
+import me.shedaniel.rei.api.common.entry.type.EntryType;
import me.shedaniel.rei.api.common.plugins.PluginManager;
import me.shedaniel.rei.api.common.plugins.REIPlugin;
import me.shedaniel.rei.api.common.plugins.REIServerPlugin;
@@ -58,10 +58,14 @@ public final class Internals {
@ApiStatus.Internal
public static <T> void attachInstance(T instance, Class<T> clazz) {
- attachInstance((Supplier<T>) () -> instance, clazz.getSimpleName());
+ attachInstanceSupplier(instance, clazz.getSimpleName());
}
@ApiStatus.Internal
+ public static <T> void attachInstanceSupplier(T instance, String name) {
+ attachInstance((Supplier<T>) () -> instance, name);
+ }
+
public static <T> void attachInstance(T instance, String name) {
try {
for (Field field : Internals.class.getDeclaredFields()) {