Chunk Loaders

Chunk Loaders

8M Downloads

[Bug] Chunkloader causes world data to load too early

Darkere opened this issue ยท 2 comments

commented

Version Info

  • Minecraft, 1.18.2

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: refinedmods/refinedstorage#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.

commented

I believe is the same problem as #50.

The problem seems to come from this line:

Arrays.stream(blocks.getAsLongArray()).mapToObj(BlockPos::of).forEach(pos -> this.add(chunk, pos));

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.

commented

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