Skip to content

Conversation

@Biquaternions
Copy link
Contributor

Did as requested.
Honestly, I'd recommend preferably doing a little context analysis of the internal calls before actually merging.

For context, calls involved in getNMS include:

  1. Retrieving a Chunk in net.minecraft.world.level.Level#getBlockState using net.minecraft.world.level.Level#getChunk.
  2. If the Chunk is not loaded, it will fallback using net.minecraft.world.level.ServerChunkCache#getChunkFallback.
  3. If the fallback fails to load the chunk asynchronously, it will schedule the load in the main thread and will force the async thread to wait using net.minecraft.world.level.ServerChunkCache#syncLoad.

If there were a lock, syncLoad can become troublesome, but seems like this is not the case on Leaf as it was on Fish.
Still, a little bit more research will be required to see if every buffered call to functions in CraftBlock that internally call getNMS are actually safe and free of possible deadlocks.

Still requires some testing and context analysis.
@Taiyou06 Taiyou06 self-requested a review August 18, 2025 09:39
@Dreeam-qwq Dreeam-qwq added the type: fix Pull request for fixing bug label Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Pull request for fixing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants