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: disable time updates when not needed #2025

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

reosfire
Copy link
Contributor

When time rate is zero we do not need to send TimeUpdatePackets to users.

@emortaldev
Copy link
Contributor

What about when you do setTimeRate(0) and setTimeRate(1)? TimeUpdate will stay as null

Copy link
Member

@mworzala mworzala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not alter the time update. Avoiding sending the time packet should be handled when sending it during tick, here:

PacketUtils.sendGroupedPacket(getPlayers(), createTimePacket());

I was under the impression the client would predict the time rate so you had to continuously send the time packet, but apparently that is not the case (anymore?).

@reosfire
Copy link
Contributor Author

This should not alter the time update. Avoiding sending the time packet should be handled when sending it during tick, here:

PacketUtils.sendGroupedPacket(getPlayers(), createTimePacket());

I was under the impression the client would predict the time rate so you had to continuously send the time packet, but apparently that is not the case (anymore?).

You right client some how uses this information. But it is not clear how exactly. If continuous packets sending is disabled, everything what I can imagine works properly. Probably this changes must wait for clarification of how client is affected by them

@reosfire reosfire marked this pull request as draft March 25, 2024 08:40
@DeidaraMC
Copy link
Collaborator

You right client some how uses this information. But it is not clear how exactly. If continuous packets sending is disabled, everything what I can imagine works properly. Probably this changes must wait for clarification of how client is affected by them

The client uses the world age for shaders

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.

None yet

4 participants