mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-19 11:59:17 +00:00
Implement Bookmark Tree Screen (#1018)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
fda7688807
commit
3d6c1c6e19
30 files changed
+4135
-135
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package codechicken.nei.bookmark.tree;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import codechicken.nei.NEIClientUtils;
|
||||
|
||||
class SearchResult {
|
||||
|
||||
public final Object searchGUID;
|
||||
public ItemTreeSlot highlightNode;
|
||||
public final Set<ItemTreeSlot> searchMatches = new LinkedHashSet<>();
|
||||
|
||||
public SearchResult(Object searchGUID) {
|
||||
this.searchGUID = searchGUID;
|
||||
}
|
||||
|
||||
public boolean matchesGUID(Object guid) {
|
||||
if (guid instanceof ItemStack stack && this.searchGUID instanceof ItemStack searchStack) {
|
||||
return NEIClientUtils.areStacksSameTypeCraftingWithNBT(stack, searchStack);
|
||||
}
|
||||
|
||||
return this.searchGUID.equals(guid);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user