Applied Flux

Applied Flux

9M Downloads

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

CanvasofSpores opened this issue ยท 8 comments

commented

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.

commented

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.

commented

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

commented

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

commented

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

commented

yea, that also works. i will implement it later

commented

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.

commented

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