Skip to content

Conversation

@Aquaeyes
Copy link
Contributor

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.

…as well as a private field to keep track of if any NBT or tag checking is occurring.
Fix for creating networks with nodes A, B, C, with network inheriting node A's UUID, disconnecting node A (retaining network UUID), and connecting node A to node D, leading to node A and D being connected to network with A's UUID despite no connections, leading to an incorrect network state. This means recreating a network with the same nodes may have a different colour.
Copy link
Owner

@DaFuqs DaFuqs left a comment

Choose a reason for hiding this comment

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

How did that ever work before

@DaFuqs
Copy link
Owner

DaFuqs commented Dec 16, 2025

Great improvement, I like it a lot, thanks!

TODO: run some final tests

@DaFuqs DaFuqs merged commit 988d826 into DaFuqs:1.20.1-aria-for-painters Dec 16, 2025
2 checks passed

if (this.getNodeType().usesFilters()) {
FilterConfigurable.readFilterNbt(nbt, this.filterItems);
this.filterHashset.clear();
Copy link
Owner

Choose a reason for hiding this comment

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

check: do we need to reset nbtCheckingFilterItems here?

Copy link
Contributor Author

@Aquaeyes Aquaeyes Dec 16, 2025

Choose a reason for hiding this comment

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

oh good point, absolutely klsdgf

DaFuqs added a commit that referenced this pull request Dec 18, 2025
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