diff options
Diffstat (limited to 'api/src/main/java/me/shedaniel/rei/impl/ClientInternals.java')
| -rw-r--r-- | api/src/main/java/me/shedaniel/rei/impl/ClientInternals.java | 9 |
1 files changed, 5 insertions, 4 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 daccb744d..d9cb5eaa8 100644 --- a/api/src/main/java/me/shedaniel/rei/impl/ClientInternals.java +++ b/api/src/main/java/me/shedaniel/rei/impl/ClientInternals.java @@ -23,6 +23,7 @@ package me.shedaniel.rei.impl; +import com.mojang.serialization.DataResult; import me.shedaniel.math.Point; import me.shedaniel.math.Rectangle; import me.shedaniel.rei.api.client.ClientHelper; @@ -60,8 +61,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<CompoundTag>, FavoriteEntry> delegateFavoriteEntry = (supplier, toJson) -> throwNotSetup(); - private static Function<CompoundTag, FavoriteEntry> favoriteEntryFromJson = (object) -> throwNotSetup(); + private static BiFunction<Supplier<DataResult<FavoriteEntry>>, Supplier<CompoundTag>, FavoriteEntry> delegateFavoriteEntry = (supplier, toJson) -> throwNotSetup(); + 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(); private static BiFunction<@Nullable Point, Collection<Tooltip.Entry>, Tooltip> tooltipProvider = (point, texts) -> throwNotSetup(); @@ -130,11 +131,11 @@ public final class ClientInternals { return tooltipEntryProvider.apply(component); } - public static FavoriteEntry delegateFavoriteEntry(Supplier<FavoriteEntry> supplier, Supplier<CompoundTag> toJoin) { + public static FavoriteEntry delegateFavoriteEntry(Supplier<DataResult<FavoriteEntry>> supplier, Supplier<CompoundTag> toJoin) { return delegateFavoriteEntry.apply(supplier, toJoin); } - public static FavoriteEntry favoriteEntryFromJson(CompoundTag tag) { + public static DataResult<FavoriteEntry> favoriteEntryFromJson(CompoundTag tag) { return favoriteEntryFromJson.apply(tag); } |
