desht / ModularRouters

A Forge Mod for item routers with pluggable modules
16 stars 20 forks source link

Way to Filter a Puller based on the inventory of a separate box #139

Open dslayer6989 opened 2 years ago

dslayer6989 commented 2 years ago

Minecraft Version

FTB Presents Direwolf20 1.16.5

Forge Version

36.1.23

Mod Version

1.16.5-7.4.0-55

Describe your problem, including steps to reproduce it

Using this in combination with the blood magic mod to try and automate the blood altar. I have 2 modular routers setup, both with a single puller and pusher (both MK2). I also have 2 chests. The first chest which is beside the first modular router is being pulled from by that router (filter = stone) and it's sending it to the blood altar with a Sender MK2 with a regulator augment = 1 (that way it only sends 1 stone at a time and won't send another stone to it unless the altar is clear.

I then have the 2nd modular router using a puller MK2 (with a filter of a blank rune, reinforced rune, and imbued ruin). It also has a sender MK2 to deposit whatever is in the router's buffer into the other chest.

Here is my issue. I want the 2nd router to leave the blank rune (the first of 4 levels) on the blood altar so it can level up to a reinforced rune and then to an imbued rune (and eventually a demonic rune at level 4). The problem is there isn't any way to do this without going back and changing the puller filter each time. What I'm looking for is a way to apply something to this router or this puller mk2 augment on this router to say, "Hey, if there are 64 blank runes (or whatever other number, which I'd like to be able to change whenever to any amount) in the box that is reference by the Sender MK2 (i.e. that isn't being looked at by the puller mk2 module), then leave the blank rune on the altar and pull it when it gets to the 2nd item in the filter list, the reinforced rune. Then, when it reaches a defined number of my choice of those, it moves on and only pulls from the blood altar the next rune in the filter list.

Unfortunately, the only way that I can think of is the round robin (which I know has been fixed in the last update which I don't have yet), but unfortunately it just goes through the list without definable stopping points (if I want 64 Imbued runes, I also have to make 64 blank runes and 64 reinforced runes). The regulator augment also doesn't work, because it says to the puller module "Hey, if there's "X" number of any of these, stop pulling them. That doesn't work because it applies filter wide and it won't grab anything.

Any other comments?

Any ideas here or is this something we could get in a future update? I can't figure out how to do this otherwise.

desht commented 2 years ago

I don't pretend to fully understand your approach here, but adjusting a filter based on the contents of a separate inventory is not something I ever plan to add to the mod, sorry.

I know people have successfully used Modular Routers to automate BM runes, and these solutions tend to involve multiple routers, one for each rune type. I don't have any links right now, though.