From 9a7d1bc21e86041d8a6f54602282a770ca557c60 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Thu, 27 Feb 2020 02:48:41 +0800 Subject: Better refiltering, 20w09a, delta based PreRecipeViewingScreen animation and fix pressing E closes when searching. Signed-off-by: shedaniel --- src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java') 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 set = Sets.newLinkedHashSet(); - set.addAll(ConfigObject.getInstance().getFilteredStacks()); + Collection 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() { -- cgit