diff options
| author | shedaniel <daniel@shedaniel.me> | 2022-02-28 10:05:31 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2022-02-28 10:05:31 +0800 |
| commit | 6ff07fe77b6d15157f262a766798e683e55c2c57 (patch) | |
| tree | 5e9099bf245611d73e4646379ae79ebb45585fb1 /api | |
| parent | e35aa217aa3bbba5653201186add39de871fae07 (diff) | |
| download | RoughlyEnoughItems-6ff07fe77b6d15157f262a766798e683e55c2c57.tar.gz RoughlyEnoughItems-6ff07fe77b6d15157f262a766798e683e55c2c57.tar.bz2 RoughlyEnoughItems-6ff07fe77b6d15157f262a766798e683e55c2c57.zip | |
Add search caching hint
Diffstat (limited to 'api')
| -rw-r--r-- | api/src/main/java/me/shedaniel/rei/api/client/search/SearchFilter.java | 10 |
1 files changed, 10 insertions, 0 deletions
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<EntryStack<?>> { * @return the original filter */ String getFilter(); + + /** + * Prepares the following stacks for matching, this could help to speed up the matching process.<br> + * However, this is not required. + * + * @param stacks the stacks to prepare + */ + default void prepareFilter(Collection<EntryStack<?>> stacks) { + } } |
