Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an API to allow mods to do their own EMI searching #496

Open
wants to merge 4 commits into
base: 1.20.4
Choose a base branch
from

Conversation

embeddedt
Copy link
Contributor

This PR aims to add an API so that mods can run their own EMI search queries without changing the contents of the global search bar. (The motivation for this change is to add support for EMI to ModernFix's creative search tree optimization, which skips vanilla's search tree creation and just uses the installed recipe viewer to do the searching instead.)

To do this, some static fields were refactored into a "search manager" object. EMI's screen manager holds one instance of such an object, and mods may create their own via EmiApi.createSearchManager().

The code may need some quality improvement work, and an outstanding question is whether some guard needs to be added to stall searches until EmiSearch.bake() has finished running.

Copy link
Owner

@emilyploszaj emilyploszaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't done as thorough a review as I'd like as I do not currently have the time, but I have gone through and pointed out some initial things I noticed.

@SergioJuniorCE
Copy link

is this still being worked on?

@emilyploszaj
Copy link
Owner

It has been shelved a bit due to a lack of need on modern versions. It may be revisited when there is more time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants