Logistics Pipes

Logistics Pipes

13M Downloads

Stop machines from jamming up due to too many or wrong item slots being filled

and-reas-se opened this issue ยท 6 comments

commented

Problem example 1: You have an alloy smelter type machine that takes a gold ingot and a silver ingot to make an electrum ingot, and does not limit which item goes into which slot. You have a crafting pipe/module set up to craft electrum ingots using this machine. You request two stacks of electrum ingots, LP system sends two stacks of gold and silver to machine. Both stacks of gold gets there first, fills up both slots. Silver can't enter, and autocrafting jams up until it's manually resolved.

Problem example 2: Same machine as example 1, but you have multiple crafting pipes/modules on the machine. Two requests fire at once, for crafting two different items in the machine. One ingredient from each craft enters the machine, and since those two aren't a valid recipe the autocrafting jams up until manually resolved (or worse: they are a valid, and the wrong item is made).

My suggested solution:

Have an upgrade for crafting pipes/modules that when applied makes them store incoming items in an internal buffer and only puts one crafts worth of items at a time in the machine, waiting for the craft to be satisfied before putting in the next set. That would solve problem example 1.

Make the upgrade have a config for an id number or name, and make all crafting modules/pipes with the same id assume that they are sharing a machine, and take turns crafting one set at a time as above. That would solve problem 2.

commented

logisticspipes-0.10.2.183.jar - this is the jar file used in Omnifactory at present release on Twitch launcher and is the build of Logistics Pipes I'm referring to. If this is fixed in a later version please let me know so I can attempt manual install of it in modpack.

Problem 1: Logistics Pipes not handling existing inventory of items properly. Had 2 fine copper wire, ordered 4 more, and the 2 already in inventory were pulled to the default route chest along with the crafted items. Should ONLY have pulled the 4 crafted items, Code for ordering quantity of item IS NOT checking for quantity of item recipe returns, IS NOT checking if it's worth it's while to pull insufficient extra for request.

Problem 2: Mk.5 Chassis Pipe on inventory of Basic Wiremill would not properly handle crafting of needed Fine Copper Wire, and was jamming up with copper wires inside of pipe instead of crafting items needed for 2nd craft. Suspect queuing of items for crafts is not properly built, needs to be examined and adjusted as required.

commented

I had a chat with davboecki a few days ago. The issue is known.
I would not build an upgrade for this, because I don't think there is a use case where you don't want to fill up a machine with not all items from a recipe of a crafting pipe. Our suggestion we came up with was to check for the number of slots the connected tile entity has. Then we could partition the input items in a way that slots are reserved for specific input items.

I think an example might be better to explain: you have a crafting recipe that uses an iron and one glass block to craft some reinforced glass. A machine like the induction furnace only has two input slots. The attached crafting pipe then reserves one input slot for iron and one for glass (maybe in the order of appearance as in the crafting pipe's recipe to allow some use cases I have never thought of). So if you request two stacks of reinforced glass and two stacks of iron make it on the way to the machine, while sand is first being furnaced* to glass, the iron only fills up the one reserved slot and the other is kept free for the later incoming glass. The rest of the ingredients is first send to the default route and later re-requested when there is space in the machine (as always). We could also check the machine slots first and see how many iron would actually fit and only send the maximum amount that can fit right now.

* new word

commented

Also this was mentioned here: #1291 (comment), but it was unrelated in that issue.

commented

What is going on with this system? Exactly half of the wrought iron ingots made in the Basic Electric Furnace on a Mk3 Chassis Pipe fail to make it over to the Basic Compressor on a Mk5 Chassis Pipe. I give up, something is bupkis in the whole routing system, as in previous versions of Logistics Pipes in previous versions of Minecraft this never used to be an issue.

If someone wants to let me know why this fails, be sure to just trigger having this system send me an email if that's possible, I'm off to some other modpack until this malarkey can get fixed somehow.

If you want the savegame to experiment with, let me know, I will upload that as a file but only if requested. Will monitor this thread for useful replies or updates, I don't know if this is an existing issue or what. I don't even know what the issue really is, I'm just seeing illogical behavior from a mod that used to be very logical ...

Oh, either of the pipes or possibly both of them - I'm not even sure anymore - had purple sparkling effects which would seem to indicate they were waiting on items that for whatever reason they never had sent to them. Breaking the power junction, even replacing it elsewhere, didn't fix this issue.

2019-07-20_16 39 09

commented

It seems that the Logistics Crafting Table is either having an issue with or doesn't like the tin cables it's getting from the Wire Mill as instead of going into the Crafting Table they get sent to the default route. If I manually place the cables into the Crafting Table it uses them. I need to figure out how to look at metadata and NBT data on items, because something is screwy here and it's definitely not my brain.

EDIT: Breaking and replacing the Logistics Power Junction seemed to fix the problem, possibly there was a pending request for one or the other of the items to be crafted stuck in the Logistics Pipes system. I don't know anymore. I certainly can't see pending requests in the system for items that some pipe is expecting from somewhere, nor can I see what the current status of some crafting request in progress is, might have to write up a feature enhancement request unless it's already possible to see this information soemehow? I don't remember that much about Logistics Pipes.

commented

I think I finally figured this out. I took out all of the wrought iron ingots and plates I had and suddenly it starts working. Was using the "Craft" button the whole time though, meaning the system should just order plates and not worry about inventories with items visible through Chassis Pipes with Provider Modules on them. I think something is not right where Logistics Pipes determines total item count. if the case is that it has to account for existing item types that are identical to what is being ordered, if they are in chests.

The "Craft" button on the Remote Orderer should always mean "I want you to take resources needed to make this item from Provider Chests and craft them into products that the recipe shows as being ordered." It should NOT mean "Get confused by items sitting in chests controlled by Provider Modules in Chassis Pipes." There clearly has been some alteration to the code base that is not separating the difference between "Craft" and "Supply" buttons on the Remote Orderer. Why this would affect item routing of crafted ingredients is something I do not know.