Api question
SirEndii opened this issue ยท 7 comments
Issue description:
I recreate some systems for my RsBridge and I noticed, my functions breaks the storage network. When I try to get the items stored in the system with NetworkNodeTile#getNode#getNetwork#ggetItemStorage#getList
, it breaks the system, I can't craft anything, I can't import items into the system with an importer(It always creates a new stack). Literally everything is broken.
I just ask what can I do, to prevent something like that?
That does not sound like something that would be caused by trying to get the Item Storage Cache. We quite regularly access that pretty much the same way.
Check your log for errors or profile things if the world is stuck or something.
IntelligenceModding/AdvancedPeripherals#69 Here is an issue report with a good video which explains the issue very good.
Check your log for errors or profile things if the world is stuck or something.
Nothing there, but I found a bad solution. I can call IStorageCache#invalidate
and this fixes the issue. But that doesn't work for patterns and I don't think, that this is a good solution.
Nope, I only put the items into a List.
https://github.com/Seniorendi/AdvancedPeripherals/blob/master/src/main/java/de/srendi/advancedperipherals/common/addons/refinedstorage/RefinedStorage.java#L148
I use there the invalidate method, but I don't like the way.
Copy them before putting it into a list.
result.add(entry.getStack().copy());
And stop calling invalidate
, it's not supposed to be used that way.
And stop calling invalidate, it's not supposed to be used that way.
Yes, I know. I just tested it with that.
Copy them before putting it into a list.
Thank you! I will try that.