Refined Storage

Refined Storage

77M Downloads

Have to reconnect external storage to drawer controller every time world loads

onlyamonth opened this issue · 60 comments

commented

Issue description:
Have to reconnect external storage to drawer controller every time world loads

What happens:
Basically the same thing as #2120, but in 1.15.2

What you expected to happen:
Storage is seen on world load

Steps to reproduce:
Make a drawer controller and some drawers, connect to external storage
Put stuff in drawers, appears in grid
Reload world - drawer contents do not appear in grid
...
Version (make sure you are on the latest version before reporting):
Minecraft: 1.15.2
Forge: 31.2.21
Refined Storage: 1.8.8
Does this issue occur on a server? yes

Modpack: Valhelsia2 2.2.3, with latest versions of refined storage, addons and storage drawers.

commented

It sounds like the mod author needs to just add a block update ability to the External Storage block, that detects when a player loads into the world then updates the External Storage block twice, the second update for redundancy purposes.

commented

It sounds like the mod author needs to just add a block update ability to the External Storage block, that detects when a player loads into the world then updates the External Storage block twice, the second update for redundancy purposes.

Maybe setting the block update to a few moments after the world has loaded, to avoid issues with load order etc. I haven't got the skill to make a pull request for this, since I unfortunately lack experience with Forge...

commented

Has anyone gotten this to happen with chests or is it limited to storage drawer controllers only?

commented

There used to be a mod that added a block that could detect a specific player in a server and emit a redstone signal based on whether that player was there or not. Using that block you could just set it next to the External Storage and let it update the block for you.

We have workarounds galore, but no fix for the problem. I'd rather have a fix to the bug.

commented

Has anyone gotten this to happen with chests or is it limited to storage drawer controllers only?

It is limited to a few storage blocks, StorageDrawer controllers are most common since they're something people use lots. The drawers themselves seem to work, so if you can put a storage bus on each...

commented

There used to be a mod that added a block that could detect a specific player in a server and emit a redstone signal based on whether that player was there or not. Using that block you could just set it next to the External Storage and let it update the block for you.

commented

If you attach a debugger to the running pack instead of loading completely from IDE (you need some special args for it) you can just debug RS + Storagedrawers.
(although performance is likely pretty bad).

commented

Part of the problem with fixing this bug is that it doesn't seem to be reproducible in fresh worlds with small storage systems. I have tried a number of times over the last few months to reproduce this and haven't been successful.

Does anyone have a world in a relatively small modpack (less than 20 mods) that has this issue? Worlds from the big modpacks like ATM6 are unfortunately not that helpful for two reasons:

  • They take quite a long time to load.
  • It is usually very difficult to get all of the mods into a Forge development environment.
commented

Part of the problem with fixing this bug is that it doesn't seem to be reproducible in fresh worlds with small storage systems. I have tried a number of times over the last few months to reproduce this and haven't been successful.

Does anyone have a world in a relatively small modpack (less than 20 mods) that has this issue? Worlds from the big modpacks like ATM6 are unfortunately not that helpful for two reasons:

  • They take quite a long time to load.

  • It is usually very difficult to get all of the mods into a Forge development environment.

I'm relatively certain it has been confirmed to happen when the storage controller and bus is in a chunk different from the RS controller, and it has been reproduced in smaller mod setups.

As said by the next post over, a debugger can be attached but it is still very tricky to track it down. I would help code wise, but again I have no dev environment nor forge dev experience.

commented

Indeed, the number of reports alone confirms that it must be an issue, but there must be more to it than just the drawer controller and external storage bus in a separate chunk from the controller. Here is an example of one of the setups I tried in 1.12. I believe I tried this in 1.16 as well and got the same results.

image

Logging out and back in still displays the drawer items in the crafting grid.

commented

You might need to chunkload it using FTBChunks to get the error to occur.

commented

I'm now trying in 1.16 but still can't get the exact behavior described in this issue to occur reliably.

What I have figured out is this: the controller does not attempt to keep loading the chunk the external storage interface and drawers are in. In a test setup where the controller and external storage were placed more than 1 render distance away from each other, I logged out while standing next to the controller, and when logging back in, the items in the drawers were no longer listed.

However, once I load the drawer controller and external storage interface with FTB Chunks, this issue goes away, and the system works normally, even after relogging.

commented

My RS and Storage Drawers have ALWAYS been in the same chunk, to save on resources when keeping chunks loaded, so I can say without a doubt that having them in separate chunks is not the culprit.

However FTBChunks may somehow be affecting it negatively via the load order in which the chunks update, potentially, slower than RS blocks do. Just a theory, but I've never not had a chunk loader with my RS and SD setup.

commented

I cannot get anything amiss to happen when everything is in one chunk. I'm convinced that the problem exists, but it refuses to appear in my test world.

commented

Still ongoing in my ATM6 1.7.6 world. Not sure what the cause is, but just takes a break/replace fo the cable and it works until the server restarts.
Oddly doesn't occur with Dank storages, so may be something specifically with RS and SD.

commented

You might need to chunkload it using FTBChunks to get the error to occur.

Nope, I replicated it consistently without FTB Utils installed: #2636 (comment)

commented

Oddly doesn't occur with Dank storages, so may be something specifically with RS and SD.

I am wondering if the storage drawer controller takes an extra tick to actually display the right contents, but doesn't notify RS when it has updated its contents on that tick. That's just a guess, though.

commented

I am experiencing this issue in Enigmatica E6 0.5.11. Entire drawer system and RS system are in the same FTBChunks loaded chunk. Have to break and re place external storage after server restarts. Breaking and re placing the drawer controller does not fix the problem, only the external storage.

commented
commented

Feels like this could probably be solved if RS waited a second or so to allow the chunks to load before checking storage buses, but that might not work over chunk borders...

I dunno, I will use the workarounds for now. Maybe the multi block from the drawer controller is loaded later and that makes RS fail to see it.

If storage buses have a status if they are connected or not, maybe it would be possible to check if they aren't and then read the inventory?

commented

All my storage drawers and RS are in same chunk. Still happening. I don't break anything to restore it. I just change the mode of the external storage connector from "item" to "liquid" and back to "item". Fixes it. Still an annoyance.

commented

All my storage drawers and RS are in same chunk. Still happening. I don't break anything to restore it. I just change the mode of the external storage connector from "item" to "liquid" and back to "item". Fixes it. Still an annoyance.

Just make it block update like setting up a timer facing the external storage and it will never be a problem anymore

commented
commented

I feel the simple solution would be for the external storage to trigger a bock update whenever it is queried by the controller.

commented

@tivec I know but i dont think we'll get any solution to this problem, its been an issue for so long now that i just give ppl the simplest option to "fix" the problem

commented

Since the discussion in this thread isn't really valuable anymore for us in order to reproduce it, I'm going to lock this issue. If anyone has any good reproduction steps, feel free to send us a message.

commented

Hi guys, this will be solved in the next version for RS (v1.11.3) on MC 1.19.2.

The fix will also be backported to 1.18.2 and will come to CurseForge soon.

commented

Can you interact with the drawer controller with hoppers etc after world reload?

commented

Yes, and that showed an interesting behaviour - the external bus sees items added to connected drawers after a new world load, but never gets the pre-existing item amounts. It's like it see's all the drawers, knows what goes in them, but thinks they're all empty.

It inserts into the drawers when new items are added via grid. You can extract those items again, but not any more than what you put in since world load, even if there are more in the drawers. Replacing the storage bus makes all existing items appear.

So, it seems on load it thinks the drawers are empty but knows what should go in them.

commented

Just to chime in, I'm seeing the same issue.

commented

Same exact issue as @onlyamonth and others as above. I'm playing:
FTB Revelation (MC 1.12.2, Forge 14.23.5.2846) SINGLE PLAYER
Refined Storage 1.6.15
Storage Drawers 1.12.2-5.4.2
RebornStorage 3.3.4.1
Refined Storage Addons 0.4.4

Originally, my personal half-solution is a relay (off on rs signal) enroute to the Ext Storage with a button that have to press after every world start otherwise as stated by others the containers are seen but read as empty. Items that my mob farm feeds into the drawers do actually show up after world start but the items that were in the drawers at world load are not visible until the inventory is re-checked like in my half-solution above.

I've been playing with the issue for the past hour reorienting the drawer controller, placing it in different locations, having the external storage connect to different faces but nothing has solved the issue yet. I isolated my refined storage to a RS Controller, Grid, and External Storage and the issue still happens. The drawers block as well as my RS system are all contained within one chunkloaded chunk. I've tried substituting Phantomfaces proxying the Drawer Controller connected to the Ext Storage instead, still fails.

I hope any of this helps. Let me know if there's anything I can do to help fig this out.

commented

Originally, my personal half-solution is a relay (off on rs signal) enroute to the Ext Storage with a button that have to press after every world start otherwise as stated by others the containers are seen but read as empty.

This is a smart workaround.

(As far as I know, 1.12 is not supported anymore by RS so this will never be fixed upstream in that version. However, https://github.com/tth05/morerefinedstorage might be willing to accept a backported fix if one is found for 1.15/1.16.)

commented

Confirmed it's still an issue on MC 1.16.4, All The Mods 6 1.3.7 (Refined Storage 1.9.9, Storage Drawers 8.2.1). Workarounds provided by others (reconnecting to drawer controller, redstone pulse, cycling through input/output modes or redstone modes) also work.

commented

Can someone provide a world (ideally with only the most necessary mods installed) which can be used to reproduce this? I can't get this to happen with just RS and Storage Drawers.

commented

I've discovered the chunk with the connection also needs to be chunk loaded using the FTB chunk loader. Any other chunkloader like chicken chunks won't replicate the issue

commented

@joseph-p-pasaoa I've tried chunkloading the entire RS system and just the external storage/storage drawer part using FTB Utilities, however, the issue is still not happening. Is there anything else special about your system that might affect how chunk reloading works?

Any other chunkloader like chicken chunks won't replicate the issue

It would be interesting to see whether this is also true in the post-1.13 versions (as I believe chunkloading mechanics changed).

commented

I believe it happens with a large storage drawer, it works with like 1 & 8 but when its like 40 4x4 drawers it doesn't seem to load, maybe its a overload of some-sort.

commented

@V8gaming Thanks for that tip; that means that the issue may be related to the storage drawer system overflowing into adjacent chunks. I'll experiment with a larger drawer setup.

commented

I've discovered the chunk with the connection also needs to be chunk loaded using the FTB chunk loader. Any other chunkloader like chicken chunks won't replicate the issue

I was chunk loading with chicken chunks and had the issue, removed my chunk loader and still have it, will try removing reborn storage as someone said it fixed for him but idk

commented

I've experimented with some different setups and still haven't been able to replicate this. It would be very useful if someone could send a world which has the problem, otherwise I'm not sure I or anyone else will be able to fix the issue.

commented

I've experimented with some different setups and still haven't been able to replicate this. It would be very useful if someone could send a world which has the problem, otherwise I'm not sure I or anyone else will be able to fix the issue.

Can send u the mods and config folder and then my world for you to see, for now ive done the redstone signal thing but this gonna be crap whenever im not at the place

commented

That'd be great!

commented

And Reborn Storage was not the problem in my case

commented

@Wishbone1977 In your own world did the same chunk thing resolve the issue? Imma test it right now

commented

But anyways its kinda crap cause ur gonna have to put every external storage in this said chunk

commented

Jus tested and it did not work for me putting them in the same chunk

commented

@Wishbone1977 In your own world did the same chunk thing resolve the issue? Imma test it right now

Yes, as I said, I got the same results from the tests in my own world (well, same world really, but my original copy of it which included chunk loading with FTB Utilities). In other words, when moving the drawer controller and external storage into the same chunk as the storage controller, the problem disappears, and the materials in the drawer system are available in the RS grid right after loading the world. When moving them back into the neighboring chunk, the materials are missing from the grid after loading the world, until a block update is forced on a block connected to the external storage (flicking a lever in my case).

commented

But anyways its kinda crap cause ur gonna have to put every external storage in this said chunk

Hehe, I didn't say it was a solution to the problem. It's just an indication of what might be a cause of the problem. I'm just playing detective here.

commented

I know wasnt talking about u when i said crap, this bug is crap

commented

Just for the record, I'm seeing the same thing in my single player world. It's my own 1.12.2 modpack, constructed through the CurseForge app. As others have mentioned in this and previous issues raised about the same problem, I also have my base chunkloaded with FTB Utilities. However, I have just run a series of tests, and the problem persists even though I have removed not only my base from the chunk loading, but removed all chunk loading altogether, including some chunks in the nether I had loaded.

I may try to make a copy of my pack, remove most of the other mods I have added to it, and then try to replicate the issue in a new world. If I manage to replicate it in a smaller world with fewer mods, I'll let you know.

commented

Okay, so I've done a bit of testing, and have gotten some results.

I took a copy of my pack to mess around with, and tried running some tests with my existing world. After each change I made, I did a "Save & Quit" and then started the world again to see if the problem persisted.

  1. Uninstall FTB utilities altogether.
    Problem persists.
  2. Break and replace both the drawer controller and the external storage.
    Problem persists.
  3. Break both the drawer controller and the external storage and move them to the same chunk as the Refined Storage controller.
    Problem goes away.
  4. Break both the drawer controller and the external storage and move them back to where they were (neighboring chunk).
    Problem returns.

In other words, it looks very much like the problem is a cross-chunk issue of some kind. My storage controller is right up against a chunk border, and my wall of drawers is up against the same border, but on the other side of the border. My drawer controller was on the other side of the drawer wall, which is why I could simply move it to the near side of the wall instead and have it end up in the same chunk as the storage controller.

In all cases where the problem manifested itself, I could make it go away by flicking a lever placed on the block next to the external storage. It would then remain absent until the world was next reloaded.

Just to be absolutely sure, I went back to my original world (that still had FTB Utils installed), restored all the chunkloading I had before, and ran tests 2-4 again, with exactly the same results. While that doesn't rule out other mods as a possible source of the problem, FTB Utilities is certainly not to blame.

Let me know if there is anything else you would like me to test.

commented

@tivec The problem solved itself for me, idk what i did or if I even did anything, but started to have issues with the multiblock from reborn kinda the same way, when I'd put any new patterns it wasnt updating on the grid, solved it by simply putting a timer conected to the multiblock giving it a block update every half of a second almost

commented

Maybe just a block update fixes it, try a timer in the block that is the last connection before the external storage

commented

Any progress on locating the source of this bug? While you can get around it with a redstone signal, it's really hampering the enjoyability of the mod for people who play on local machines..

commented

Same exact issue as @onlyamonth and others as above. I'm playing:
FTB Revelation (MC 1.12.2, Forge 14.23.5.2846) SINGLE PLAYER
Refined Storage 1.6.15
Storage Drawers 1.12.2-5.4.2
RebornStorage 3.3.4.1
Refined Storage Addons 0.4.4

Originally, my personal half-solution is a relay (off on rs signal) enroute to the Ext Storage with a button that have to press after every world start otherwise as stated by others the containers are seen but read as empty. Items that my mob farm feeds into the drawers do actually show up after world start but the items that were in the drawers at world load are not visible until the inventory is re-checked like in my half-solution above.

I've been playing with the issue for the past hour reorienting the drawer controller, placing it in different locations, having the external storage connect to different faces but nothing has solved the issue yet. I isolated my refined storage to a RS Controller, Grid, and External Storage and the issue still happens. The drawers block as well as my RS system are all contained within one chunkloaded chunk. I've tried substituting Phantomfaces proxying the Drawer Controller connected to the Ext Storage instead, still fails.

I hope any of this helps. Let me know if there's anything I can do to help fig this out.

A very useful workaround. I have expanded upon it for wireless usage, as i often logout away from the main part of my base.
rename an item starting with 1 so that it shows up on the grid right in the first spot (assuming you sort by name ascending).
then use a detector to detect just one of said item. it will put out a redstone signal that you can use to toggle the external storage just by taking the stick out then putting it back into the storage via your favourite wireless grid.

commented

I have this same issue, currently playing the MC Eternal modpack (not sure if that matters or not). The issue is specifically External Storages and Drawer Controllers from Storage Drawers mod. My temporary fix is to break and replace the external storages after loading the world, but if I forget a lot of my machines will start to fill up my drive storage.

commented

I have a similar issue in the AllTheMods6 pack. I've found if I just cycle through the import/export/both modes after startup, it solves the issue

commented

So, my system stopped having the issue and the only thing I did was put a storage monitor on top of my disk drive and that storage monitor happens to be looking at an item in my storage drawers. Now, I am not sure if it matters where I placed the monitor (on the disk drive) or that it is looking for something located in my storage drawers.

commented

@Goldy93 The problem will stop if you have any block update in the external storage thats connected to the drawer, like a timer or something else, I'm usually using a 10ticks timer on it