GregTechCEu / GregTech

GregTech CE 1.12 fork continuing progression and development
GNU Lesser General Public License v3.0
226 stars 170 forks source link

Itempipes Returns #27

Closed brachy84 closed 2 years ago

brachy84 commented 2 years ago

This pr introduces item pipes.

How it works

When something tries to insert into a pipe, the net will gather all itemhandlers with distance to source and caches them for next transfer. The net then tries to insert the stack based on the distribution mode. The distribution mode can be set on conveyors next to pipes in gui. The current modes are insert first and (true) round robin. I have not tested it much, but it's working perfectly fine on the stuff i tested

There are 5 sizes. Each size can transport different amount of items per sec. The rate and also the max range can be set via material. Pipes respect conveyor filters on insert Pipes respect robot arm settings on insert It does not use methods from robot arm. It mimics its behaviour Robot arms can NOT insert into pipes. If it is something you really want, i can implement it.

ItemWalker is now only used to gather information about inventories of the net. The transfer logic is now in ItemNetHandler

Also fixes pipe and cable hitbox

Cover gui when connected to ONE pipe grafik grafik The first button toggles between round robin and first insert. The second button toggles if the inventory should accept items if the cover is set to insert to pipes (to avoid looping)

brachy84 commented 2 years ago

Wait for the material meta item pr

Irgendwer01 commented 2 years ago

Wait for the material meta item pr

I need to wait tho sadly

brachy84 commented 2 years ago

I have found a major bug and I'm unable to find why it happens. When the target inventory has a conveyor (or robot arm) on the opposite the pipe is attached to, then the items will not be inserted. Only happens when the conveyor is set to export. I will try to fix the next few days.

brachy84 commented 2 years ago

I'm dead I got the capality from the wrong side.

brachy84 commented 2 years ago

Performance test: grafik I placed a 10x10 wall of bronze chests with pipes on both sides and lv cover (export) on one side. I placed a aluminium chest full of dirt near the wall and connected it, so I have 2 pipe nets with 103 pipes each (cover on aluminium chest is uv, export and round robin) I did the same thing for eio conduits While not working:

While working:

GT item pipes have a slightly better performance. Now this is only 206 pipes. I would like to see a comparison with 1000 pipes

serenibyss commented 2 years ago

As pointed out in Discord (but putting it here as well), fluid pipes seem to be basically non-functional with this PR. However, with the fix above, Cables seem to work fine, and in my (limited) testing, Item Pipes are also perfectly fine. I don't want Fluid Pipes to block this PR, so as long as you are willing to work on them after this is merged, it's fine by me. I could review the code a bit more, but I think it could be merged with the one above fix

brachy84 commented 2 years ago

I did a bit of testing and cables are not fine grafik the first one fills almost up and the other two only have like 3000. They get a little bit after reconnecting pipes