Skip to content

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

Open
embeddedt wants to merge 4 commits intoemilyploszaj:1.20.4from
embeddedt:search-api
Open

Add an API to allow mods to do their own EMI searching#496
embeddedt wants to merge 4 commits intoemilyploszaj:1.20.4from
embeddedt:search-api

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

@VaporeonScripts
Copy link

is this being worked on? it would be cool to have that

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.

4 participants