diff options
| author | shedaniel <daniel@shedaniel.me> | 2021-03-28 01:44:38 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2021-03-28 01:44:38 +0800 |
| commit | c80c345c4fa3def0536bcecbc2223f202af79415 (patch) | |
| tree | 26208cfd201227070b546f5f12d260c9c6db9775 /api/src/main/java/me/shedaniel/rei/impl | |
| parent | b11c3866aada638f0ad758ced4068c71e620ce23 (diff) | |
| download | RoughlyEnoughItems-c80c345c4fa3def0536bcecbc2223f202af79415.tar.gz RoughlyEnoughItems-c80c345c4fa3def0536bcecbc2223f202af79415.tar.bz2 RoughlyEnoughItems-c80c345c4fa3def0536bcecbc2223f202af79415.zip | |
Complete custom favorites
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.java | 12 |
1 files changed, 6 insertions, 6 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 1daaa568d..50e512c49 100644 --- a/api/src/main/java/me/shedaniel/rei/impl/ClientInternals.java +++ b/api/src/main/java/me/shedaniel/rei/impl/ClientInternals.java @@ -23,7 +23,6 @@ package me.shedaniel.rei.impl; -import com.google.gson.JsonObject; import me.shedaniel.math.Point; import me.shedaniel.math.Rectangle; import me.shedaniel.rei.api.client.ClientHelper; @@ -37,6 +36,7 @@ import me.shedaniel.rei.api.client.view.ViewSearchBuilder; import me.shedaniel.rei.api.common.plugins.PluginManager; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.FormattedText; import net.minecraft.resources.ResourceLocation; @@ -57,8 +57,8 @@ public final class ClientInternals { private static Supplier<ViewSearchBuilder> viewSearchBuilder = ClientInternals::throwNotSetup; private static Supplier<PluginManager<REIClientPlugin>> clientPluginManager = ClientInternals::throwNotSetup; private static Supplier<EntryRenderer<?>> emptyEntryRenderer = ClientInternals::throwNotSetup; - private static BiFunction<Supplier<FavoriteEntry>, Supplier<JsonObject>, FavoriteEntry> delegateFavoriteEntry = (supplier, toJson) -> throwNotSetup(); - private static Function<JsonObject, FavoriteEntry> favoriteEntryFromJson = (object) -> throwNotSetup(); + private static BiFunction<Supplier<FavoriteEntry>, Supplier<CompoundTag>, FavoriteEntry> delegateFavoriteEntry = (supplier, toJson) -> throwNotSetup(); + private static Function<CompoundTag, FavoriteEntry> favoriteEntryFromJson = (object) -> throwNotSetup(); private static Function<Boolean, ClickArea.Result> clickAreaHandlerResult = (result) -> throwNotSetup(); private static BiFunction<@Nullable Point, Collection<Component>, Tooltip> tooltipProvider = (point, texts) -> throwNotSetup(); private static Supplier<List<String>> jeiCompatMods = ClientInternals::throwNotSetup; @@ -117,12 +117,12 @@ public final class ClientInternals { return tooltipProvider.apply(point, texts); } - public static FavoriteEntry delegateFavoriteEntry(Supplier<FavoriteEntry> supplier, Supplier<JsonObject> toJoin) { + public static FavoriteEntry delegateFavoriteEntry(Supplier<FavoriteEntry> supplier, Supplier<CompoundTag> toJoin) { return delegateFavoriteEntry.apply(supplier, toJoin); } - public static FavoriteEntry favoriteEntryFromJson(JsonObject object) { - return favoriteEntryFromJson.apply(object); + public static FavoriteEntry favoriteEntryFromJson(CompoundTag tag) { + return favoriteEntryFromJson.apply(tag); } public static <T> EntryRenderer<T> getEmptyEntryRenderer() { |
