Skip to content

feat: Add item and block search by active NEI query (Alt+T & Alt+Y) - #33

Closed
soran57 wants to merge 2 commits into
GTNewHorizons:masterfrom
soran57:feature/nei-search-query
Closed

feat: Add item and block search by active NEI query (Alt+T & Alt+Y)#33
soran57 wants to merge 2 commits into
GTNewHorizons:masterfrom
soran57:feature/nei-search-query

Conversation

@soran57

@soran57 soran57 commented Jun 22, 2026

Copy link
Copy Markdown

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.

Copilot AI review requested due to automatic review settings June 22, 2026 19:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread src/main/java/com/gtnh/findit/service/itemfinder/ItemFoundResponse.java Outdated
Comment thread src/main/java/com/gtnh/findit/service/itemfinder/FindItemRequest.java Outdated
Comment thread src/main/java/com/gtnh/findit/handler/ThaumcraftProvider.java
Comment thread src/main/java/com/gtnh/findit/service/itemfinder/FindItemRequest.java Outdated
Comment thread src/main/java/com/gtnh/findit/service/blockfinder/FindBlockRequest.java Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@soran57 soran57 closed this by deleting the head repository Jul 24, 2026
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.

2 participants