GlodBlock / ExtendedAE

add a pattern provider with 36 slots for AE2
GNU Lesser General Public License v3.0
34 stars 29 forks source link

[Feature Request/Regression] Ability to blacklist certain items when using tag/mod busses #74

Closed Ianthasys closed 9 months ago

Ianthasys commented 9 months ago

The recent removal of the ! operator from tag/mod busses removes the ability to blacklist certain items when using tags. While it was definitely bugged and needed a fix, This now means that there isn't a way to blacklist certain items when using tag busses. Either a working reimplementation of the ! operator, or a different means of blacklisting specific items would be a great feature to allow more specific filtering of items.

One possible implementation of this could be by using two text fields, one for whitelisted items (which is how the current one works), and a second field for items that should be blacklisted.

GlodBlock commented 9 months ago

i think you can use a inverter card to blacklist tags. ! is removed because of it becomes confusing when a item has multip tags. for example: item X has tag: a, b, item Y has tag: a, c filter is a && !(c) this filter should pass X and deny Y, but in fact both X and Y can pass it because Y has tag a which matches this filter. so ! operator causes unexpected behaviors and i have no idea to fix it, then it only can be removed

Ianthasys commented 9 months ago

As of current, the bus isn't able to use the filter card. In that case it would still only allow general tag blacklisting. The main argument/use case I have for the ! operator or something similar is for something like gregtech or other ore processing lines where one would want to send everything from forge:raw_materials with a few exceptions into a specific machine, and everything else into another machine. I have to do a bit of testing first to see, but I'm not sure if that's currently doable using the tag busses. (It may be possible using bus priority, but I think it wouldn't be very intuitive to set up.)

The main tags used in this case are typically subtypes of tags like forge:raw_materials/iron and forge:raw_materials/gold where certain types need to be processed in certain machines, but they all use the same main tag, with the specific subtype.

Ianthasys commented 9 months ago

I think that my possible implementation that I had mentioned in the original post could be a possible way to address the unexpected behaviors

this filter should pass X and deny Y, but in fact both X and Y can pass it because Y has tag a which matches this filter. so ! operator causes unexpected behaviors and i have no idea to fix it, then it only can be removed

GlodBlock commented 9 months ago

you can use two filter to achieve this in gregtech image

I think that my possible implementation that I had mentioned in the original post could be a possible way to address the unexpected behaviors

you mean which post

Ianthasys commented 9 months ago

One possible implementation of this could be by using two text fields, one for whitelisted items (which is how the current one works), and a second field for items that should be blacklisted.

This here

GlodBlock commented 9 months ago

yea, that also works. i will implement it later

Ianthasys commented 9 months ago

Thank you for your dedication and patience. While I have some experience with node-based programming, I'm not familiar enough with java or modding the game, so I could imagine that I probably haven't been the best of help with this.

GlodBlock commented 9 months ago

added https://legacy.curseforge.com/minecraft/mc-mods/ex-pattern-provider/files/5104243