The portable storage interface cannot extract all items from the moving contraptions.
Icewater661 opened this issue ยท 3 comments
Describe the Bug
When the portable storage interface extract items from the moving contraptions, the moving contraptions will only stop for a few seconds to retrieve several stacks of items, rather than waiting for all the items to be extracted.
Reproduction Steps
1.Create a moving contraptions,put some items into the inventories.
2.Use the portable storage interface to extract items
3.Some of the items were not extracted.
Expected Result
All the items are extracted, just like what happened when the item was entered.
Screenshots and Videos
2022-06-21.18-49-42.mp4
Crash Report or Log
No response
Operating System
Windows11
Mod Version
0.4.1
Minecraft Version
1.18.2
Other Mods
No response
Additional Context
No response
For devs: the Storage wrapper only calls onContentChanged in the insert and extract methods of Storage, but the Fabric API also supports extracting through StorageViews obtained by iterating over the Storage. This bypasses the insert and extract methods on the Storage wrapper, so onContentTransferred never gets called.
See my fork for proof of concept solution. It seems to work fine.
I don't wanna make it a PR because StorageWrapper should probably replace WrappedStorage in Porting Lib, not be a part of Create. I also made some not-strictly-necessary changes to unify the item and fluid interfaces somewhat; I'm not sure if you'd want to keep those changes or not. Feel free to use whichever parts of my changes you'd like.
Can confirm, in the ponder screen it says the PSI won't continue moving until items have stopped being transferred, however this does not happen. It stops for a few seconds and continues moving.