From e35aa217aa3bbba5653201186add39de871fae07 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Sun, 27 Feb 2022 19:06:59 +0800 Subject: Fix #787 --- .../java/me/shedaniel/rei/api/client/registry/entry/EntryRegistry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api') diff --git a/api/src/main/java/me/shedaniel/rei/api/client/registry/entry/EntryRegistry.java b/api/src/main/java/me/shedaniel/rei/api/client/registry/entry/EntryRegistry.java index 8c4c9e4b3..6ff3af865 100644 --- a/api/src/main/java/me/shedaniel/rei/api/client/registry/entry/EntryRegistry.java +++ b/api/src/main/java/me/shedaniel/rei/api/client/registry/entry/EntryRegistry.java @@ -153,7 +153,7 @@ public interface EntryRegistry extends Reloadable { // TODO Re-evaluate the need for this @ApiStatus.Internal - Collection> refilterNew(Collection> entries); + Collection> refilterNew(boolean warn, Collection> entries); /** * Checks if a stack is already registered. -- cgit From 6ff07fe77b6d15157f262a766798e683e55c2c57 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Mon, 28 Feb 2022 10:05:31 +0800 Subject: Add search caching hint --- .../java/me/shedaniel/rei/api/client/search/SearchFilter.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'api') diff --git a/api/src/main/java/me/shedaniel/rei/api/client/search/SearchFilter.java b/api/src/main/java/me/shedaniel/rei/api/client/search/SearchFilter.java index 2038b7cdb..80b4987df 100644 --- a/api/src/main/java/me/shedaniel/rei/api/client/search/SearchFilter.java +++ b/api/src/main/java/me/shedaniel/rei/api/client/search/SearchFilter.java @@ -27,6 +27,7 @@ import me.shedaniel.rei.api.common.entry.EntryStack; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import java.util.Collection; import java.util.function.Predicate; /** @@ -70,4 +71,13 @@ public interface SearchFilter extends Predicate> { * @return the original filter */ String getFilter(); + + /** + * Prepares the following stacks for matching, this could help to speed up the matching process.
+ * However, this is not required. + * + * @param stacks the stacks to prepare + */ + default void prepareFilter(Collection> stacks) { + } } -- cgit