Pastel Node filter optimisation, and NBT filtering fix #796
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.
Constructs an internal hashmap of filtered Items for Pastel Nodes, to be used when no NBT / tag selection is occurring, with an internal count of how many special-cased filtering items are in the filter, so as to only use the optimised version when no special-casing is required. Should improve filtering performance in most cases - the cost is setting and removing items from a filter that have NBT is slightly more expensive, but the expense is roughly equivalent to the filter being checked once for the node for transfer, so it should almost certainly be a performance increase.
Additionally, prevented Lore from being lowercased in NBT filter handling, as it prevented any matches, and fixed damage checks by checking the NBT as an int as well as a number.