Luke100000 / minecraft-comes-alive

Replaces Minecraft's villagers with humans, who can be interacted with.
GNU General Public License v3.0
77 stars 58 forks source link

Fix deadlock issue with reaper spawn #718

Closed spoorn closed 1 year ago

spoorn commented 1 year ago

Crash Report:

crash-2023-07-23_15.07.16-server.txt

Properly check neighboring chunks are loaded

Luke100000 commented 1 year ago

Hi, thanks! Has this specific chunk load pattern a reason? Would a 3x3 check make more sense here?

spoorn commented 1 year ago

I'm not sure, I used 2x2 in my own mod https://github.com/spoorn/myLoot/blob/main/src/main/java/org/spoorn/myloot/core/LootableContainerReplacer.java#L209 but sometimes deadlocks aren't very consistent.

I did run MCA Reborn with this change on my server of 300+ mods, and used Chunky to run through chunks for 24 hours and no crashes so I believe it's good enough to not deadlock. If it makes more sense for the ReaperSpawn logic to check 3 chunks out, then it can be that as well, but 2x2 gets rid of the deadlock it seems