
Item Conduit dupe glitch with Storage Drawers
Opened this issue · 4 comments
What happens:
When trying to pipe non-stackable items from a storage drawer (from the mod Storage Drawers) to another inventory, like a chest with item conduits the items are duplicated.
What you expected to happen:
The quantity in the storage drawer should match the amount in the output inventory.
Steps to reproduce:
- Place a Storage Drawer
- Place a chest a few blocks away
- Put several identical non-stackable items (like Book And Quill) into the storage drawer
- Attach the storage drawer to the chest with item conduits, with the storage drawer side set to extract and the chest side set to insert.
- You will find at least 5-10 duplicated items in the chest
Only happens with item conduits, it doesn't work with pipes from other mods.
Affected Versions:
- EnderIO: 1.10.2-3.0.1.138_beta
- EnderCore:1.10.2-0.4.1.60
- Minecraft: 1.10.2
- Forge: 1.10.2-12.18.2.2171
- Storage Drawers: 1.10.2-3.5.5
If you need more information let me know.
Confirmed. Appears to be related to the conduit attempting to pull multiple items. Without upgrades, the conduit normally pulls 4 items. As such, having 4 or more items will remove 1 and place 4 in the chest. Having only 3 items will remove 1 and place 3 in the chest. 2 items removes 1 and places 2. 1 item doesn't duplicate.
A speed downgrade reduces the extraction to 1 item at a time and causes no item duplication. Conversely, speed upgrades will duplicate up to 64 (again, depending on how many items are in the drawer already).
Appears to work with any receiving inventory. 64 books and quills in one drawer, 15 speed upgrades, and I got 2080 books and quills in another storage drawer. Tested on single player. Same versions as the original post, except I'm using Storage Drawers 3.5.6.
Debug crash log:
https://gist.github.com/VT-14/7579b99637ec8a5282f137020d423e99
I'll have to go over this with the debugger, but from the description I tend to blame Storage Drawers for giving us illegal itemStacks. (stacks of non-stackable items)
It shouldn't be for extraction: https://github.com/jaquadro/StorageDrawers/blob/1.10/src/com/jaquadro/minecraft/storagedrawers/inventory/DrawerItemHandler.java#L153
Calls to getStackInSlot will though, which is explicitly permitted by the IItemHandler contract.