-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: add thaumcraft integration to search for essentia #24
feat: add thaumcraft integration to search for essentia #24
Conversation
The way that the Filter system since #22 is structured is a bit inverted for this (and in general?). |
Correct. this is necessary because each block can have its own algorithm for reading its inventory. |
I don't have an answer to that. I don't play with magic and I don't know how it would be convenient. |
Well aspects aren't actual items, so you would have to go out of your way to search them in NEI before you could ever make use of this feature. Expanding this feature to include phials and jars sounds like a sensible way to allow people to discover it. Most likely you would want to interpret the search as an "item search" if the phial/jar is empty and as an "aspect search" otherwise. |
It's possible - just do the logic of extracting the needed data from the TE in the match method of the filter instead of the constructor. The Filter would then be specific to the item we're searching for instead of the TE/Stack in which we're searching, and the logic to process the inspected TE/Stack would be moved from the constructor of the filter to the match method.
if we just invert it, then it's
(Whether the extracting from inspectedThing is actually done in the constructor or in the getFilter which calls the constructor is irrelevant here, it's the same) This would mean the sigature of public interface IStackFilter {
boolean matches(FindItemRequest request);
} to public interface IStackFilter {
boolean matches(ItemStack stack);
boolean matches(TileEntity tileEntity);
} and similarly, |
temp.mp4Now with searching by essentia container |
Closes GTNewHorizons/GT-New-Horizons-Modpack#17591
temp.mp4
Searching for an Aspect Item from Thaumcraft NEI Integration will find Items (Phials, Jars) and Blocks (Nodes, Jars, ...) that contain essentia of that aspect.
This currently only happens when doing the Find Item on the Aspect Item specifically. It could easily be added that this also happens when pressing it on a filled Phial or Jar directly, if that's desirable (would mirror the behavior for fluid ex. water bucket).