diff options
| author | shedaniel <daniel@shedaniel.me> | 2024-04-16 01:51:04 +0900 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2024-04-16 01:51:04 +0900 |
| commit | 5f61d89501a4eadd99c805c973b1ef49a3a3aaee (patch) | |
| tree | e5dff8a4b5c22a32e66cc4d9f15caedc2fc86a0f /api/src | |
| parent | 9bdb9cb7c0a03accb6f86bcedff4b22f38f1346f (diff) | |
| download | RoughlyEnoughItems-5f61d89501a4eadd99c805c973b1ef49a3a3aaee.tar.gz RoughlyEnoughItems-5f61d89501a4eadd99c805c973b1ef49a3a3aaee.tar.bz2 RoughlyEnoughItems-5f61d89501a4eadd99c805c973b1ef49a3a3aaee.zip | |
Fix merge conflicts
Diffstat (limited to 'api/src')
| -rw-r--r-- | api/src/main/java/me/shedaniel/rei/api/client/registry/display/DisplayRegistry.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/api/src/main/java/me/shedaniel/rei/api/client/registry/display/DisplayRegistry.java b/api/src/main/java/me/shedaniel/rei/api/client/registry/display/DisplayRegistry.java index 50e05be85..9e309c943 100644 --- a/api/src/main/java/me/shedaniel/rei/api/client/registry/display/DisplayRegistry.java +++ b/api/src/main/java/me/shedaniel/rei/api/client/registry/display/DisplayRegistry.java @@ -237,7 +237,7 @@ public interface DisplayRegistry extends RecipeManagerContext<REIClientPlugin> { * @since 8.4 */ @ApiStatus.Experimental - default <T extends Recipe<?>, D extends Display> void registerRecipesFiller(Class<T> typeClass, RecipeType<? super T> recipeType, Function<? extends T, @Nullable Collection<? extends D>> filler) { + default <T extends Recipe<?>, D extends Display> void registerRecipesFiller(Class<T> typeClass, RecipeType<? super T> recipeType, Function<? extends RecipeHolder<T>, @Nullable Collection<? extends D>> filler) { registerRecipesFiller(typeClass, type -> Objects.equals(recipeType, type), filler); } @@ -269,7 +269,7 @@ public interface DisplayRegistry extends RecipeManagerContext<REIClientPlugin> { * @since 8.4 */ @ApiStatus.Experimental - default <T extends Recipe<?>, D extends Display> void registerRecipesFiller(Class<T> typeClass, Predicate<RecipeType<? super T>> recipeType, Function<? extends T, @Nullable Collection<? extends D>> filler) { + default <T extends Recipe<?>, D extends Display> void registerRecipesFiller(Class<T> typeClass, Predicate<RecipeType<? super T>> recipeType, Function<? extends RecipeHolder<T>, @Nullable Collection<? extends D>> filler) { registerRecipesFiller(typeClass, recipeType, Predicates.alwaysTrue(), filler); } @@ -305,8 +305,12 @@ public interface DisplayRegistry extends RecipeManagerContext<REIClientPlugin> { * @since 8.4 */ @ApiStatus.Experimental - default <T extends Recipe<?>, D extends Display> void registerRecipesFiller(Class<T> typeClass, Predicate<RecipeType<? super T>> recipeType, Predicate<? extends T> predicate, Function<? extends T, @Nullable Collection<? extends D>> filler) { - registerDisplaysFiller(typeClass, recipe -> recipeType.test((RecipeType<? super T>) recipe.getType()) && ((Predicate<T>) predicate).test(recipe), filler); + default <T extends Recipe<?>, D extends Display> void registerRecipesFiller(Class<T> typeClass, Predicate<RecipeType<? super T>> recipeType, Predicate<? extends RecipeHolder<T>> predicate, Function<? extends RecipeHolder<T>, @Nullable Collection<? extends D>> filler) { + registerDisplaysFiller(RecipeHolder.class, recipe -> { + return typeClass.isInstance(recipe.value()) + && recipeType.test((RecipeType<? super T>) recipe.value().getType()) + && ((Predicate<RecipeHolder<T>>) predicate).test(recipe); + }, filler); } /** |
