[0.9] InjectItems now dupes Items!
SonOfTheStars opened this issue ยท 6 comments
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
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?
This needs to be reverted: d112fa6#diff-805d19d56ed7ddc39e84e0291390ecc2L561
and this d112fa6#diff-e6242c7e7ae6672b21182d4668069b52R54 needs to be adapted.
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.
Fixed!
#613