feat: Add item and block search by active NEI query (Alt+T & Alt+Y) - #33
Closed
soran57 wants to merge 2 commits into
Closed
feat: Add item and block search by active NEI query (Alt+T & Alt+Y)#33soran57 wants to merge 2 commits into
soran57 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new “search by active NEI query” mode for both item-in-container highlighting and block-in-world highlighting, triggered via Alt+T and Alt+Y respectively, by sending precomputed sets of matching item/block keys over the network.
Changes:
- Extended item/block request/response network messages to support “search by name” via sets of lightweight keys.
- Added client tick listeners that read the active NEI search filter, build up to ~1000 matching keys, and send them to the server.
- Updated matching logic on server/provider side to support the new request mode (including special handling for Thaumcraft aspect items).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/gtnh/findit/service/itemfinder/ItemFoundResponse.java | Adds name-search payload serialization for item results. |
| src/main/java/com/gtnh/findit/service/itemfinder/ItemFindService.java | Sends the richer response based on the full request. |
| src/main/java/com/gtnh/findit/service/itemfinder/FindItemRequest.java | Adds name-search request mode, key serialization, and matching helper. |
| src/main/java/com/gtnh/findit/service/itemfinder/ClientItemFindService.java | Adds Alt+T NEI-query extraction and request sending; integrates response handling. |
| src/main/java/com/gtnh/findit/service/blockfinder/FindBlockRequest.java | Adds name-search request mode and key serialization for blocks. |
| src/main/java/com/gtnh/findit/service/blockfinder/ClientBlockFindService.java | Adds Alt+Y NEI-query extraction and request sending. |
| src/main/java/com/gtnh/findit/service/blockfinder/BlockFindService.java | Updates server-side matching to support name-search requests. |
| src/main/java/com/gtnh/findit/handler/ThaumcraftProvider.java | Adds name-search matching support for Thaumcraft aspect containers. |
| src/main/java/com/gtnh/findit/handler/MinecraftProvider.java | Updates default stack matching to use key-based matching in name-search mode. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the ability to search for items in containers and blocks in the world using the active NEI search bar query.
Alt + T - highlights inventory slots containing items matching the NEI search query.
Alt + Y - highlights blocks in the world matching the NEI search query.
NBT tags are stripped on the client for all items except Thaumcraft aspect items to keep packets small and de-duplicate tool variants (Tinkers'/GregTech). GregTech tile entities are matched using getMetaTileID(). Up to 1000 unique keys per query.