diff options
Diffstat (limited to 'api/src/main/java')
| -rw-r--r-- | api/src/main/java/me/shedaniel/rei/api/client/registry/display/DisplayRegistry.java | 12 |
1 files changed, 12 insertions, 0 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 14204c920..36c726145 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 @@ -202,6 +202,18 @@ public interface DisplayRegistry extends RecipeManagerContext<REIClientPlugin> { <T, D extends Display> void registerFiller(Class<T> typeClass, Predicate<? extends T> predicate, Function<T, D> filler); /** + * Registers a display filler, to be filled during {@link #tryFillDisplay(Object)}. + * <p> + * Vanilla {@link Recipe} are by default filled, display filters + * can be used to automatically generate displaies for vanilla {@link Recipe}. + * + * @param predicate the predicate of the object + * @param filler the filler, taking an object and returning a {@code D} + * @param <D> the type of display + */ + <D extends Display> void registerFiller(Predicate<?> predicate, Function<?, D> filler); + + /** * Tries to fill displays from {@code T}. * * @param value the object |
