SuperMartijn642 / ChunkLoaders

15 stars 11 forks source link

[Bug] Chunkloader causes world data to load too early #54

Closed Darkere closed 1 year ago

Darkere commented 2 years ago

Version Info

Description of the Bug The chunkloaders mod seems to cause the world data to be loaded too early. Early enough that the level itself is not loaded yet. RS relies on reading the level, which causes it to entirely lose its stored data.

Steps to Reproduce chunkload RS system

User summed it up well over here: https://github.com/refinedmods/refinedstorage/issues/3299

I'm not sure if there is another way for us to read the world data to avoid this. But changing the load order seems a bit sketchy.

SuperMartijn642 commented 2 years ago

I believe is the same problem as #50.

The problem seems to come from this line: https://github.com/SuperMartijn642/ChunkLoaders/blob/5cb2d4967b0e3e5a2e593d2fae2583cd4af890d6/src/main/java/com/supermartijn642/chunkloaders/ChunkLoaderUtil.java#L133 The line is part of the loading code for Chunk Loaders' world capability. During loading, the ChunkLoaderUtil$ChunkTracker#add method ends up calling World#setChunkForced which also causes the chunk to load. This is not intentional behavior, but rather just a side effect of calling World#setChunkForced during world capability loading.

I don't have much time available to work on mods currently, so it might be a while before this gets addressed.

SuperMartijn642 commented 1 year ago

The problem is fixed now in version 1.2.0 of Chunk Loaders. Thank you for reporting the issue!