From ffb0a6413360b0579e7331d71dd934a7d0050d16 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Wed, 2 Jun 2021 16:12:20 +0800 Subject: Refactor DisplayFiller --- .../rei/api/client/registry/display/DisplayRegistry.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'api/src/main/java/me') 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 @@ -201,6 +201,18 @@ public interface DisplayRegistry extends RecipeManagerContext { */ void registerFiller(Class typeClass, Predicate predicate, Function filler); + /** + * Registers a display filler, to be filled during {@link #tryFillDisplay(Object)}. + *

+ * 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 the type of display + */ + void registerFiller(Predicate predicate, Function filler); + /** * Tries to fill displays from {@code T}. * -- cgit