Logistics Pipes

Logistics Pipes

13M Downloads

[0.9] InjectItems now dupes Items!

SonOfTheStars opened this issue ยท 6 comments

commented

The injectItems Method now fully Dupes Items that are Injected into the LP Network by any Machine with auto-eject.
Probably injectItems is returning the opposite of what it should, because the Original Items never get removed from the Output Slot of the Machine!
Confirmed with:

  • All Thermal Expansion Machines
  • All EnderIO Machines
  • All Buildcraft Machines
commented

Probably caused by me fixing a dupe bug for the TD interaction... :(

commented

I will intensivly monitor the parts you changed and hopefully get a quick solution.
I assume youre off to the same attempt.
So what was that dupe bug you tried to fix?

commented
commented

The first part appears correct. Our transport.InjectItems returns the number of items rejected, tile.injectItem returns how many items were accepted - as BC tile.injectItem is supposed to.
Seems to me the problem is in https://github.com/RS485/LogisticsPipes/blob/mc17-0.9/common/logisticspipes/pipes/basic/LogisticsTileGenericPipe.java#L418
According to the TE API, insertItem is supposed to return the stack of rejected items, while our injectItem returns the number of accepted items. So we need to subtract the injectItem return value from the passed in stacksize in insertItem before the if blocks.

commented

Fixed!
#613

commented