nineMinecraft is a joke site.
nineMinecraft is in no way affiliated with Modrinth or 9minecraft. (And frankly, who wants to be affiliated with the latter?)
asahi

asahi

Mod

Remove jittering of the moving sun caused by client desync!

Client Utility

2,389 downloads
35 followers

Client side Minecraft mod that removes daylight cycle rubber-banding caused by server lag!

If you ask for forge I'll steal your kneecaps

The problem

Every second (20 ticks,) the server sends a packet that syncs the world time between the client and the server. Since clients have no reference for the tick rate of the server, they assume that the server is running at the standard 20 ticks per second. As such, when the server is lagging, that 20 ticks takes longer to process, leading the client to display the sun ahead of where it is on the server. When that sync packet comes in the vanilla client snaps the sun to the server position, causing the issue that this mod fixes.

The solution

A rolling weighted average, and some interpolation! First, we take samples of the last 10 seconds of the amount of ticks that passed on the server per tick on the client. Then, since the sample from 10 seconds ago isn't as relevant as the sample in the last second, we weigh each of them exponentially less compared to the first. Taking the average of this weighted list, we can effectively predict the movement of the sun over the next second. The margin of error in the suns position caused by the prediction varies, but it is imperceptbile in comparison to the snap-back that happens with the vanilla logic.

Without Asahi:

Daylight cycle without Asahi

With Asahi:

Daylight cycle with Asahi

Please note that this gif is from an earlier version of the mod, the interpolation used has only gotten better since!

Circular Sun is part of a resource pack provided by vanillatweaks.net

External resources


Project members

hugeblank

Owner


Technical information

License
Client side
required
Server side
unsupported
Project ID