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

Fix syncing on dedicated servers #141

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

celestialfault
Copy link
Contributor

Fixes #138, #116; supersedes #117

This moves the initial join sync out from the client event class, which resulted in the event never being registered on a dedicated server.

Along with that, this has been changed to sync when a player begins tracking another player, instead of simply fire-hosing sync packets for all connected players to the joining player, which should hopefully further reduce the possibility of issues like #116 appearing again.

Note that I haven't actually been able to test that these changes fully work, beyond starting a dedicated server and ensuring that you can join it (and that the client->server sync appears to be sent and received properly).

PacketSync and PacketGenderInfo have also been merged into a single WildfireSync class, using PacketGenderInfo (renamed to PacketSync) as the only packet class sent over the network.

This change was made largely due to the changes required on the server-side sending of packets, due to to making use of entity tracking for initial syncing instead, but was also made as I quite simply couldn't properly wrap my head around which class referred to which side.

This fixes the initial join sync on dedicated servers, as well as
various issues around the sync being sent too early (which is most
prominent on Quilt), which results in the receiving client crashing

This also splits event lambdas into their own functions for readability,
and merges PacketSync and PacketGenderInfo to a single WildfireSync
class, using PacketGenderInfo (renamed to PacketSync) as the only packet
class sent over the network.
@WildfireRomeo WildfireRomeo merged commit aec4fac into WildfireRomeo:fabric-1.20 Sep 18, 2023
@celestialfault celestialfault deleted the fix/sync branch September 19, 2023 00:51
@celestialfault celestialfault mentioned this pull request Apr 25, 2024
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.19.2 Settings do not sync over server automatically?
2 participants