Refined Storage

Refined Storage

77M Downloads

Nested filter applies to default view, and its whitelist setting is reversed on the filtered view tab

Jack-McKalling opened this issue ยท 3 comments

commented

Describe the bug

If you nest filters into another filter, you can combine settings together. But the logic doesn't work correctly. This is all very complicated to explain, so I've made screenshots of everything.

  • Situation one; you filter items by their mod, by creating a tab with a nested whitelist filter for each mod, and set the parent filter to blacklist.
    Each tab now correctly filters the view to the items for that mod, and the default view now correctly shows all items as if not filtered.
    refined filters mods

If you change the parent filter to whitelist, the individual tabs still work correctly, but the default view now shows nothing.
refined filters mods reversed

  • Situation two: you want to merge multiple sets of hardcoded filtered items into a single tab, by applying the logic learned from above that the parent filter should be set to blacklist to fix the default view. So you nest individual whitelist filters into a parent blacklist filter that defines the tab.
    Now the default view shows the specifically filtered items defined by all the child filters combined (applying the filter inappropriately), regardless of the parent filter's whitelist setting. In addition to that, the tab for said parent filter now shows either all items (unfiltered) if you set the parent to blacklist, but nothing in case of whitelist (reversed logic).

refined filters colours
Changing parent filter to whitelist:
refined filters colours reversed

How can we reproduce this bug or crash?

  1. Setup a basic network with controller, (crafting) grid, and external storage attached to a chest
  2. Fill the chest with the items as shown in the first image
  3. Create three filters, two child and one parent, as shown in the screenshots

What Minecraft version is this happening on?

Minecraft 1.19.2

What Forge version is this happening on?

43.1.47

What Refined Storage version is this happening on?

1.11.0

Relevant log output

No response

commented

This is why I don't like nested filtering. I didn't have time to look into your screenshots in detail, but I'm assuming this is caused because RS doesn't care about the nested child properties. It just adds the nested items from the children.

commented

Kinda. This is a nesting issue, but its more a bug related to naming vs not naming the filter.

commented

... naming vs not naming the filter.

I think you're referring to defining a filtered tab for the filter item. It requires a name and an item. Yes, I believe that relates to this issue too. I don't know exactly how it works.

My assumption is that when a filter item defines a custom tab, it behaves differently than another filter item that doesn't. And when they get nested, this tab interferes with the nesting somehow.