diff options
| author | shedaniel <daniel@shedaniel.me> | 2022-02-28 11:05:49 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2022-02-28 11:05:49 +0800 |
| commit | d8740038eb741e4470a2783dd4a759d07a190bf1 (patch) | |
| tree | 8a2cef8e069371d09c6a452c0593c2ed26de2a73 /runtime/src/main/java/me/shedaniel/rei/impl/common | |
| parent | ac2a724b0575438357810fdc71b4c2fa6590665c (diff) | |
| parent | 6ff07fe77b6d15157f262a766798e683e55c2c57 (diff) | |
| download | RoughlyEnoughItems-d8740038eb741e4470a2783dd4a759d07a190bf1.tar.gz RoughlyEnoughItems-d8740038eb741e4470a2783dd4a759d07a190bf1.tar.bz2 RoughlyEnoughItems-d8740038eb741e4470a2783dd4a759d07a190bf1.zip | |
Merge remote-tracking branch 'origin/7.x-1.18' into 7.x-1.18.2
# Conflicts:
# runtime/src/main/java/me/shedaniel/rei/impl/client/search/argument/type/TagArgumentType.java
Diffstat (limited to 'runtime/src/main/java/me/shedaniel/rei/impl/common')
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/common/entry/type/EntryRegistryImpl.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/type/EntryRegistryImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/type/EntryRegistryImpl.java index d56f32e10..06792d75b 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/type/EntryRegistryImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/type/EntryRegistryImpl.java @@ -197,7 +197,7 @@ public class EntryRegistryImpl implements EntryRegistry { int index = entries.lastIndexOf(afterEntry); entries.add(index, stack); } else entries.add(stack); - preFilteredList.addAll(refilterNew(Collections.singletonList(stack))); + preFilteredList.addAll(refilterNew(true, Collections.singletonList(stack))); queueSearchUpdate(); } } @@ -216,7 +216,7 @@ public class EntryRegistryImpl implements EntryRegistry { int index = entries.lastIndexOf(afterEntry); entries.addAll(index, filtered); } else entries.addAll(filtered); - preFilteredList.addAll(refilterNew(filtered)); + preFilteredList.addAll(refilterNew(true, filtered)); queueSearchUpdate(); } } @@ -231,8 +231,8 @@ public class EntryRegistryImpl implements EntryRegistry { @ApiStatus.Internal @Override - public Collection<EntryStack<?>> refilterNew(Collection<EntryStack<?>> entries) { - if (lastRefilterWarning != null) { + public Collection<EntryStack<?>> refilterNew(boolean warn, Collection<EntryStack<?>> entries) { + if (lastRefilterWarning != null && warn) { if (lastRefilterWarning.getValue() > 0 && System.currentTimeMillis() - lastRefilterWarning.getValue() > 5000) { RoughlyEnoughItemsCore.LOGGER.warn("Detected runtime EntryRegistry modification, this can be extremely dangerous, or be extremely inefficient!"); } |
