Skip to content

Conversation

@AtlaStar
Copy link
Contributor

@AtlaStar AtlaStar commented Sep 2, 2022

Based on info provided by XFactHD on the forge discord, this implements needed fixes after removing the previous checks for the MC instance in the packets to ensure there are no issues when in a multiplayer context.

All this does is check the dist to static initialize an optional that holds the MC instance. If for whatever reason the ClientUtils class is initialized in the server, the methods within will use the newly added Optional to poll the MC instance, and use that optional to dictate whether inner logic of the functions should run, or if it should prematurely terminate.

It also now marks the packets as handled in the packet class themselves rather than needing to pass it into the methods of ClientUtils

Based on info provided by XFactHD on the forge discord, needed fixes for removing the checks for the MC instance to ensure there are no issues when in multiplayer context.
@AtlaStar
Copy link
Contributor Author

AtlaStar commented Sep 2, 2022

Also should mention, this was a quick fix and needs more thorough testing.

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.

1 participant