Wyn-Price / SecretRooms

8 stars 8 forks source link

Fixed deadlock when starting server with a SecretBlock in the spawn chunks #53

Closed Heroco closed 3 years ago

Heroco commented 3 years ago

This pull request aims to fix the following bug:

A secret block in spawn chunks (in my case it was a chunk, that was loaded by a chunk force loading mod), will try to get a blockstate from a chunk, but in this specific case, the call won't return, ever.

(I didn't investigate this further, but the only explanation I can come up with, is that the main thread waits for the mods to finish, and the getChunk call has to be executed by the main thread, thus they both wait for each other)

Screenshot of the bug (from VisualVM) https://i.imgur.com/Rivn0Aa.png

Wyn-Price commented 3 years ago

Could you leave a brief description and a link to this PR in a comment somewhere?