aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-02-27 02:48:41 +0800
committershedaniel <daniel@shedaniel.me>2020-02-27 02:48:41 +0800
commit9a7d1bc21e86041d8a6f54602282a770ca557c60 (patch)
tree06efc60d62062e11c19af7f27230c35aec776803 /src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java
parent2af7db96fa42f6c3c4cf2c90a170cfd25533c7ac (diff)
downloadRoughlyEnoughItems-9a7d1bc21e86041d8a6f54602282a770ca557c60.tar.gz
RoughlyEnoughItems-9a7d1bc21e86041d8a6f54602282a770ca557c60.tar.bz2
RoughlyEnoughItems-9a7d1bc21e86041d8a6f54602282a770ca557c60.zip
Better refiltering, 20w09a, delta based PreRecipeViewingScreen animation and fix pressing E closes when searching.
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java')
-rw-r--r--src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java b/src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java
index c6d6ce190..c4db31c96 100644
--- a/src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java
+++ b/src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java
@@ -94,15 +94,14 @@ public class EntryRegistryImpl implements EntryRegistry {
public void refilter() {
long started = System.currentTimeMillis();
- Set<EntryStack> set = Sets.newLinkedHashSet();
- set.addAll(ConfigObject.getInstance().getFilteredStacks());
+ Collection<EntryStack> filteredStacks = ConfigObject.getInstance().getFilteredStacks();
preFilteredList.clear();
for (EntryStack stack : getStacksList()) {
- if (findFirstOrNullEqualsEntryIgnoreAmount(set, stack) == null)
+ if (findFirstOrNullEqualsEntryIgnoreAmount(filteredStacks, stack) == null)
preFilteredList.add(stack);
}
long time = System.currentTimeMillis() - started;
- RoughlyEnoughItemsCore.LOGGER.info("[REI] Refiltered %d entries in %dms.", set.size(), time);
+ RoughlyEnoughItemsCore.LOGGER.info("[REI] Refiltered %d entries in %dms.", filteredStacks.size(), time);
}
public void reset() {