From 256b1398b538228840b865e09a7f79694de4b651 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Tue, 30 May 2023 04:25:48 +0800 Subject: Improve search again --- .../java/me/shedaniel/rei/impl/common/entry/AbstractEntryStack.java | 1 + .../me/shedaniel/rei/impl/common/entry/type/EntryRegistryImpl.java | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'runtime/src/main/java/me/shedaniel/rei/impl/common') diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/AbstractEntryStack.java b/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/AbstractEntryStack.java index 73f54172f..cf9c5b865 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/AbstractEntryStack.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/common/entry/AbstractEntryStack.java @@ -231,6 +231,7 @@ public abstract class AbstractEntryStack implements EntryStack, Renderer { } return tooltip.getValue(); } catch (Throwable throwable) { + if (context.isSearch()) throw throwable; CrashReport report = CrashReportUtils.essential(throwable, "Getting tooltips"); CrashReportUtils.renderer(report, this); throw CrashReportUtils.throwReport(report); 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 f555a44c3..038786804 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 @@ -125,6 +125,10 @@ public class EntryRegistryImpl implements EntryRegistry { return Collections.unmodifiableList(filteredList.getComplexList()); } + public List getComplexList() { + return Collections.unmodifiableList(registryList.collectHashed()); + } + @Override public void refilter() { List stacks = registryList.collectHashed(); -- cgit