Applied Energistics 2

Applied Energistics 2

156M Downloads

Unloading a Chunk with AE2 Machine Causes Some Stuff to Unload

teoWei opened this issue ยท 10 comments

commented

Describe the bug

[Title]
My machine
image

My machine after chunks gets unloaded.
image

You can see in the screenshots that I have a chunk loader too. (The purple table with green outlines on top.)

How to reproduce the bug

Not sure how to reproduce the bug.

Expected behavior

Stuff to not unload.

Additional details

The cables are still there but they need a block update to reappear. They don't connect until the cables are there.

Which minecraft version are you using?

1.17

On which mod loaders does it happen?

Fabric

Crash log

https://pastebin.com/dhXJ6cxy

commented

why not related issue? Look at the commit and quote. There clearly visible issue with the rendering of some blocks, but with sodium it becomes critical and leads to a fatal error

I don't know what exactly the issue is. But I am sure of one thing for sure, sodium and the current version of AE2 are not working properly together

commented

CaffeineMC/sodium#942

This looks to be the fault of another mod which is modifying the map of entities from outside the main thread, since we're only reading this map, and we're on the main thread when we do so. I can't determine which mod is at fault from the crash report, so you'd be best off narrowing down mods one by and one, and reporting it to their authors.

Looks like something was wrong with this commit 3d53423

commented

We do not officially support mods like sodium. As such, we're not going to fix this right now.

edit: Wait, why are you posting about sodium this in completely unrelated issue?

commented

I recently tested out copying the world and moving it into another instance with only AE2, and the bug was still happening.
I could give you the world download if you want.

commented

Yes please, world download with instructions on what to do would help a lot.

commented

https://www.dropbox.com/s/lli1ynopv552cro/New%20World%20%281%29.zip?dl=0

Join the world, unload the AE2 system(go through the portal or go far away), reload the system and check it.

commented

image

Caught a CME and saw this in the log while loading the world... Something is wrong on our side. Investigating...

commented

image
Alright, this is our problem it seems.

commented

This looks extremely similar to the problem I fixed in my mod here: XFactHD/FramedBlocks@2bb44a0 (Forge 1.16 code with MCP names).
You should be able to do something similar to that fix by getting the LevelChunk from the Level yourself after checking for its existence and then requesting the BlockEntity from that instead and passing in the additional argument that I added in my fix.

commented

It turns out the problem was actually us returning null in toClientTag in some cases. Should be fixed by #5572.