CyclopsMC / IntegratedTunnels

Transfer other energy, items and fluids over Integrated Dynamics networks
MIT License
20 stars 13 forks source link

Some slots 'hog' item transfer when exporting item by item type with slot specified #203

Closed met4000 closed 3 years ago

met4000 commented 3 years ago

Issue type:


Short description:

When using subnetworks to export multiple specific items into specific slots of a dispenser, slots 2, 5, and 8 (the 'right-hand side slots') seem to 'hog' or 'jam' item transfer.

Steps to reproduce the problem:

  1. Place output container (tested with droppers and dispensors, similar behaviour may exist with chests, etc.) and item source container
  2. Construct array of item exporters pointing into item interfaces
  3. Connect the interface subnetwork to the output container with an item interface, and the exporter subnetwork to the item source container with an item interface
  4. Using the Export Item aspect, provide unique target slots for each exporter, and use a variable card to set each exporter to a specific item type (tested using various wool colourings)

See below image for example setup (the one used to test this); image (in the image, each block in the 3x3 grid (as observed from the side with the dispenser) represent that slot in the dispenser; i.e. currently the interfaces for slots 2, 5, and 8 are disconnected from the interface subnetwork)

Observed Behaviour:

Item transfer will only 'properly' occur when the exporter(s) or interface(s) for slots 2, 5, and 8 are disconnected from the rest of their subnetwork. If any 1 of those slots is connected, then item transfer to all other slots ceases, but occurs for that slot. If 2 or more of those slots are connected, no item transfer occurs.

Expected behaviour:

All item[ type]s transferred to set slot(s).


Versions:

rubensworks commented 3 years ago

Thanks for reporting!

met4000 commented 3 years ago

Some additional testing using importers yielded similar results, but with slot 7 additionally 'hogging'/'jamming' item transfer.

image

rubensworks commented 3 years ago

So this is actually due to intentional behaviour. When using item interfaces to re-expose an inventory, the slots that the network exposes do not necessarily correspond to the inventory's slots. Since several other item interfaces are in use in your case, also these will cause slots to be exposed to the network. You can confirm this by reading the item interface with an inventory reader, and there will be more than 9 slots.

I would suggest to use something like a Capability Proxy to expose an inventory via multiple sides so that you can achieve fine-grained slot insertion for all slots.

If I (or someone else) ever get to #69, this will behave as you would expect.