Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put Networking impls back onto-thread #31

Merged
merged 3 commits into from
Apr 23, 2024
Merged

Conversation

fzzyhmstrs
Copy link
Contributor

fixes: #30

Proposed changes

  • Add server.execute() wrapper around impl in the MoreMobVariants call to registerGlobalReceiver
  • Add client.execute() wrapper around impl in the MoreMobVariantsClient call to registerGlobalReceiver

Reasoning

Networking happens in it's own collection of Netty Event Loop threads, not on the main Render and Server threads. As such, any interaction with Minecraft itself inside networking is off-thread. execute() queues a task with the server/client to run the code inside it on-thread when it's able.

@fzzyhmstrs
Copy link
Contributor Author

The client packet change will need more work. the design of the PacketByteBuf read needs a bit of rework

@nyuppo nyuppo merged commit 49d1d37 into nyuppo:master Apr 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] 1.20.1 Crash
2 participants