SquidDev-CC / plethora

A peripheral provider for ComputerCraft
https://plethora.madefor.cc/
MIT License
56 stars 23 forks source link

Galacticraft: Oddities between push/pullItems #263

Open fatboychummy opened 4 years ago

fatboychummy commented 4 years ago

Running MC 1.12.2, CC:Tweaked 1.86.2, Plethora 1.2.2 Original issue from the Milo repository

After setting up a milo system I noticed that my galacticraft machines were failing to move items. Listing the items seemed to work fine, however.

After doing some singleplayer testing, I noticed the Plethora correctly detects the amount of slots if you wrap the machine, then do machine.pullItems("chest", ...), but if you wrap the chest and do chest.pushItems("galacticraft machine", ...) it detects there are less slots than actually available.

Using the example from the linked issue, Slots of Circuit Fabricator

These are the slots in the circuit fabricator. Slot 1 is the energy slot, 2 to 6 are inputs, and 7 is the output.

Using the following setup: image

Using chest contents (for simplicity, items are placed in the chest in the corresponding slot they would be in the circuit fabricator): image

Pulling items to their slots seems to work perfectly fine, using code:

for i = 2, 6 do
  peripheral.call(fabricator, "pullItems", chest, i, 1, i)
end

results in no errors, and all the items moving appropriately: image

However, using pushItems from the chest it seems to just not be happy, using code:

for i = 2, 6 do
  peripheral.call(chest, "pushItems", fabricator, i, 1, i)
end

results in an error: image and only a few of the items being moved correctly: image

fatboychummy commented 4 years ago

After doing some extensive testing, it seems that this may be due to the way Galacticraft handles it's item inputs. Putting two silicon in a hopper above the block seem to push items into slot 3 and 4. Using that same idea, I did two pushes to slot 3 from the chest, and that indeed also pushed items into slot 4 (which may explain why slot 5 and 6 are now slot 4 and 5).

fatboychummy commented 4 years ago

It causes a few problems, however, since it is not really expected behaviour