aboutsummaryrefslogtreecommitdiff
path: root/api/src/main/java/me/shedaniel/rei/impl
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-06-27 16:38:33 +0800
committershedaniel <daniel@shedaniel.me>2021-06-27 16:38:33 +0800
commitc0c2bd8d259b9ccc55d2111d806220753b9d89bd (patch)
tree52059a5dd2bcc6320e750a48e1b1e4c22adebbca /api/src/main/java/me/shedaniel/rei/impl
parentf6b10e75179c8237cab172d757238d1404273187 (diff)
downloadRoughlyEnoughItems-c0c2bd8d259b9ccc55d2111d806220753b9d89bd.tar.gz
RoughlyEnoughItems-c0c2bd8d259b9ccc55d2111d806220753b9d89bd.tar.bz2
RoughlyEnoughItems-c0c2bd8d259b9ccc55d2111d806220753b9d89bd.zip
Fix #572 & add getDraggableAcceptingBounds
Diffstat (limited to 'api/src/main/java/me/shedaniel/rei/impl')
-rw-r--r--api/src/main/java/me/shedaniel/rei/impl/ClientInternals.java9
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);
}